Enable Apache mod_rewrite on Windows
In httpd.conf file the following line should be uncommented :
LoadModule rewrite_module modules/mod_rewrite.so
by removing the # sign before it.
Then comes a section which looks like this :
<Directory "C:/Apache2.2/htdocs">
#
# 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
<span id="more-207"></span>
#
# 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 None
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
The line :
AllowOverride None
should be made :
AllowOverride All
Restart Apache. Create a .htaccess file somewhere in htdocs and write some garbage text in it like akjsnajknda and save. Create a index.php along with the .htaccess file. Now open the index.php file in browser and you should get an Internal Server Error. This indicates that .htaccess file is wrong , which means that mod_rewrite is now active.
Popularity: 3% [?]















