CurtC
May 27 2005, 08:55 PM
On my site, if a browser requests the file
http://mydomain.com/download/myfile.prc, the file is sent with a header of "Content-Type: text/plain", which causes browsers on some OSes (ones which actually treat this info properly) to display it as text in the browser. How do I set the server to send it as "Content-Type: application/octet-stream"?
Files with extensions of .exe are being sent with the correct header BTW.
Squire
May 28 2005, 06:55 AM
There are a few ways to do it.
You could add the Content-Type to the head of the page code, you could AddType in your httpd.conf file if you need it to be server wide, or if you need it for just a single domain or even just part of a domain you could do it via .htacess.
The .htacess method, which would be what I would use personally, would look like:
AddType application/octet-stream .prc