Commands in .htaccess files are inherited by all subdirectories. Because of this, you must be careful that you don't inadvertently change Apache's behavior in directories beneath the one with the.htaccess file. On the other hand, you can use this property to your advantage to limit which files your .htaccess commands affect.
Unless otherwise indicated, these commands are part of Apache and their documentation can be found at:
You can enable and disable chtml with the following commands:
chtmlUse on chtmlUse off
This only works on www.washington.edu systems.
If you desire an extremely low-security model, you can use what is known as Basic Authentication.
If you have a document with a mime type which is not supported server-wide, or you wish to change the mime type of files which are already set to something else, you can change those commands via a .htaccess file.
Warning: Internet Explorer often ignores the mime type sent back by the server, and overrides that with what it believes to be the correct mime type based on the filename extension. One way you can see this in action is if you have a file with the extension of .html but the server sends, for example, the text/plain mime type, Internet Explorer will (incorrectly, according to the HTTP specification) interpret the file as HTML. Netscape, however, will accept the mime type and display the file as plain text.
To add (or change) a file extention to a certain mime type, you use the AddType command. For example, if you wish to change all .txt files to be interpreted as HTML, you would use:
AddType text/html txt
If you wish for all files in a directory to be mapped to the same mime type, you use the ForceType. To force all files to be interpreted as HTML, you would use:
You might, for example, want to use this command if the files in a directory do not necessarily end with .html.
If you wish for Apache to automatically generate a directory listing, you need to explicitly enable that feature. You can do so with:
Be very careful that you do not put any unintentional files in this directory.
If you wish to have a description of the directory, you can put that text into a file named HEADER, and it will appear before the directory listing. The contents of the file named README will appear after the directory listing.
To add text descriptions for files, you can use the AddDescription command. As an example, if you wish to make all files which have names containing "153" to be described as "Version 1.5.3" and all files which have names containing "154" to be described as "Version 1.5.4" you would use:
AddDescription "Version 1.5.3" *153* AddDescription "Version 1.5.4" *154*