Enable mod_rewrite in apache

If you are using Windows OS and want to enable mod_rewrite module here is how to do it.
This is the general configuration guideline both for Windows and Linux server:

QUOTE

1. Find the httpd.conf file (usually you will find it in a folder called conf, config or something along those lines)
2. Inside the httpd.conf file uncomment the line LoadModule rewrite_module modules/mod_rewrite.so (remove the pound ‘#’ sign from in front of the line)
3. Also find the line ClearModuleList is uncommented then find and make sure that the line AddModule mod_rewrite.c is not commented out.

For Windows, find the following section in httpd.conf file:


DocumentRoot "C:/path/to/my/root" 

# Each directory to which Apache has access, can be configured with respect 
# to which services and features are allowed and/or disabled in that 
# directory (and its subdirectories). 
# 
# First, we configure the "default" to be a very restrictive set of 
# permissions. 
#

Now modify the option for AllowOverride to look like this:
<Directory />
Options All
AllowOverride All
</Directory>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s