WARNING: This page was written based on Ubuntu 10.04 (Lucid), although the same may apply to other releases. You are encouraged to also read:
- The related ubuntu server guide (Choose your distribution version > “Ubuntu Server Guide” > “Web servers”).
- The apache htaccess tutorial: http://httpd.apache.org/docs/2.0/howto/htaccess.html
By default, Ubuntu’s Apache will ignore the directives in your .htaccess files.
When (not) to use .htaccess files
According to Apache.org’s Apache Tutorial,
“In general, you should never use .htaccess files unless you don’t have access to the main server configuration file. There is, for example, a prevailing misconception that user authentication should always be done in .htaccess files. This is simply not the case. You can put user authentication configurations in the main server configuration, and this is, in fact, the preferred way to do things.”
“.htaccess files should be used in a case where the content providers need to make…
View original post 678 more words