.htaccess tutorial

htaccess Elite


Force Files to download, not be displayed in browser

Anything not fitting into other categories

Force Files to download, not be displayed in browser

Postby produke » 03 Oct 2006 02:21

By default, if a text file (.txt) is requested, the contents of the file is shown in the browser and is not downloaded. This is because the default MIME type for .txt files specifies to show the files and not download them. You can however change this by adding the line below:

Code: Select all
AddType application/octet-stream txt
User avatar
produke
 
Posts: 242
Joined: 25 Sep 2006 04:48

Return to Main