I just had to set up an Apache server for a school project. Because I like to use
.htaccess files to set rewrite rules and fiddle with some other options, some extra modules had to be loaded in addition to the standard batch.
Activating Apache modules is easy: simply open up the
httpd.conf file in the
/conf/ folder of your Apache installation, and uncomment (or add) the appropriate lines. Commented lines always start with a hash (
Basically, to load mod_negotiation (for MultiViews) and mod_rewrite (for rewrite rules), you simply add the following lines to
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule rewrite_module modules/mod_rewrite.so
So far, so good. Apache is instructed to load the extra modules; we should now be able to use MultiViews and rewrite rules by defining them in a
However, when I tried using
Options +MultiViews, all I got was one of those infamous “500 Internal Server Error” pages.
The error log said something among the lines of
.htaccess: Option MultiViews not allowed here.
Turns out Apache has a default setting in
httpd.conf which specifies the settings that can be overriden by what’s written in your
httpd.conf might contain something like this:
Deny from all
Contrary to what you may think, the
All parameter doesn’t really mean “[allow overriding] all options”, since it doesn’t include the MultiViews option! The key here is to use
AllowOverride Options=All,MultiViews. Together with all other groupings of directives, this is the code we need:
AllowOverride AuthConfig FileInfo Indexes Limit Options=All,MultiViews
Deny from all