Seems like everytime I need to configure Apache to use mod.rewrite, I follow all of the instructions to ensure that the library files are installed with Apache and also check that the .htaccess file is all correct…yet it still does not work. There is one extra step that seems to be left out of all of the online documentation – and it is such a simple fix. I wish Apache would add it to the documentation.
Look at the Directory section of the httpd.conf file. By default on most operating systems (Red Hat, Fedora, CentOS) the default value for AllowOverride is “None”. Change the value to “All” and it is likely the solution to your problem.
<pre>
#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/var/www/html">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
</pre>
Comments