Making a TXT file downloadable (HTTP)
Hey,
I'm running a webserver and i've uploaded serveral .txt files. I want them to be downloadable... For example if someone opens: http://www.example.org/something.txt, to start downloading, not just to open in the browser. Thnx. |
Either you tell people to right click the link and download the file, or you add .zip to the end of the file name so that the browser can't open it. It doesn't have to be .zip, anything that the browser and the server don't understand will do. There is no secret, even if the text file is opened in the browser, it has already been downloaded, so people can save the page if they want.
|
Or you can add in httpd.conf:
Code:
AddType application/octet-stream .txt |
Quote:
Actually I had to add it in the .htaccess file, but it worked. |
All times are GMT -5. The time now is 10:27 AM. |