downloading text files from apache

2004-03-03 Thread fbsd_user
From my web page I link to .zip, .tgz, and .exe files and when the
link
is clicked, apache will open window to download the file.

When I link to an .txt file it gets opened and displayed. I want to
have it open for download like the other files.

Is there some config option in httpd.conf that I have missed?

Thanks





___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: downloading text files from apache

2004-03-03 Thread Peter Risdon
fbsd_user wrote:

From my web page I link to .zip, .tgz, and .exe files and when the
link
is clicked, apache will open window to download the file.
When I link to an .txt file it gets opened and displayed. I want to
have it open for download like the other files.
Is there some config option in httpd.conf that I have missed?
 

To understand the issue, read the man page for mime.types(5), and look 
at /usr/local/etc/apache/mime.types

Text files are meant to be displayed like that. Easiest answer is to 
compress them and offer the compressed version for download.

PWR.

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: downloading text files from apache

2004-03-03 Thread fbsd_user
I got no info found for man mime.types

Are you saying that if I delete the statement for .txt out of the
/usr/local/etc/apache/mime.types file that apache will
download .txt files?

Is there some statement I can add to httpd.conf to over ride
the mime.types file?

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Peter
Risdon
Sent: Wednesday, March 03, 2004 9:38 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED] ORG
Subject: Re: downloading text files from apache

fbsd_user wrote:

From my web page I link to .zip, .tgz, and .exe files and when the
link
is clicked, apache will open window to download the file.

When I link to an .txt file it gets opened and displayed. I want to
have it open for download like the other files.

Is there some config option in httpd.conf that I have missed?


To understand the issue, read the man page for mime.types(5), and
look
at /usr/local/etc/apache/mime.types

Text files are meant to be displayed like that. Easiest answer is to
compress them and offer the compressed version for download.

PWR.

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to
[EMAIL PROTECTED]

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: downloading text files from apache

2004-03-03 Thread Peter Risdon
fbsd_user wrote:

I got no info found for man mime.types
 

No, my fingers were ahead of my brain... mime.types(5) is put there by 
cups and refers to its own mime.types file.

Are you saying that if I delete the statement for .txt out of the
/usr/local/etc/apache/mime.types file that apache will
download .txt files?
 

I'm not advocating that. I'm advocating that you understand what this 
will do and why before thinking of doing it, and that in the meantime 
you compress any text files you want to make available for download, so 
they download as .zip, .gz or whatever.

Apache's documentation says of the mime.types file:

This file sets the default list of mappings from filename extensions to 
content types; changing this file is not recommended.
(http://httpd.apache.org/docs/mod/mod_mime.html#typesconfig)

Note there is an entry for zip files in mime.types with an extension, 
and one for gzipped files without an extension. Both download as you 
want on your computer but will behave slightly differently on some other 
machines. The server and browser are interacting here. It's worth 
learning about it properly before editing a configuration file.

Is there some statement I can add to httpd.conf to over ride
the mime.types file?
 

There's an AddType statement for adding new mime types. That won't help 
you here, though.

Bear in mind that when a browser displays a text file, it _has_ 
downloaded it. If the viewer wants to save it, they can. It's displayed 
to be helpful. Text files can be read and displayed by browsers. 
Changing this will change it everywhere, with everything the server 
does. Are you sure that's what you want?

PWR.

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: downloading text files from apache

2004-03-03 Thread Asenchi
On Wed, 03 Mar 2004 16:55:46 +
Peter Risdon [EMAIL PROTECTED] wrote:

+ I'm not advocating that. I'm advocating that you understand what this
+ will do and why before thinking of doing it, and that in the meantime
+ you compress any text files you want to make available for download,
so + they download as .zip, .gz or whatever.

I am all for advocating people to read and learn.  But there is another
solution.  Depending on the browser/environment you could right click
and 'Save As'.

// Asenchi
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]