You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Lainee Scott <la...@yahoo.com> on 2002/04/23 17:59:05 UTC

Send files as TEXT only even if HTML

Hello all!

Basically I have a VirtualHost that I would like to
always send data as TEXT only.  I want to allow users
to download the files from this VirtualHost...or
rather, view the contents of the file.  So, if the
file
contains PHP or HTML or just text (whatever) I would
like the browser to always display the contents of the
file uninterpretted.  However, I would
like not to have to change all file extensions on the
files.  I also afraid that browsers will interpret the
HTML in files regardless of the
file extension I add.

Here's the premise: I'd like users to be able to
upload files to my server (HTML, gzips, PHP, PERL,
whatever) for storage, backup.  Then I'd like
them to be able to download the file again when they
want to through a Web interface.

I hope this makes sense.  It makes a TON of sense to
me!  :)

Thanks.

__________________________________________________
Do You Yahoo!?
Yahoo! Games - play chess, backgammon, pool and more
http://games.yahoo.com/

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Send files as TEXT only even if HTML

Posted by Joshua Slive <jo...@slive.ca>.
On Tue, 23 Apr 2002, Rodent of Unusual Size wrote:

> Lainee Scott wrote:
> >
> > Basically I have a VirtualHost that I would like to
> > always send data as TEXT only.

>         ForceType text/plain

That's the correct config. But note that, if any of your clients
are using MSIE, you're not going to like the results because of
this:
http://httpd.apache.org/docs/misc/FAQ.html#ie-ignores-mime

Joshua.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Send files as TEXT only even if HTML

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Lainee Scott wrote:
> 
> Basically I have a VirtualHost that I would like to
> always send data as TEXT only.  I want to allow users
> to download the files from this VirtualHost...or
> rather, view the contents of the file.  So, if the
> file
> contains PHP or HTML or just text (whatever) I would
> like the browser to always display the contents of the
> file uninterpretted.

Try

<VirtualHost whatever>
    <Directory />
        ForceType text/plain
    </Directory>
</VirtualHost>
-- 
#ken	P-)}

Ken Coar, Sanagendamgagwedweinini  http://Golux.Com/coar/
Author, developer, opinionist      http://Apache-Server.Com/

"Millennium hand and shrimp!"

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org