» Birthday Bundle - Over $400 worth of Envato files for just $20

Enabling mod_rewrite module in Apache HTTP Server

Posted on August 27, 2008, Filled under PHP,  Bookmark it

Hello,

In this short tutorial we will learn how to enable the mod_rewrite module in Apache Server.

Step 1
Locate the folder where apache is installed (in localhost is usually in: C:Program FilesApache Software FoundationApache2.2). Find the folder “conf”. You will find in it the file: httpd.conf.

Step 2
Find the line #LoadModule rewrite_module modules/mod_rewrite.so. Uncomment it so it will look like this:

LoadModule rewrite_module modules/mod_rewrite.so

Look for #AddModule mod_rewrite.c and uncomment it as well.

AddModule mod_rewrite.c

In the same file search for:

<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>

and replace it with:

<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>

You may have many other attributes between the ‘Directory’ tags. Make sure that AllowOverride is set to ‘All’.

Save the new httpd.conf and restart Apache.

Good luck!

Do you wish to receive the latest updates as soon as they are posted? Get our RSS Feed or Subscribe to the Newsletter!

Get our RSS Feed!

3 Replies to "Enabling mod_rewrite module in Apache HTTP Server"

  1. [...] you how to make SEO Friendly URLs in Apache Server. First of all you must check if you have the mod_rewrite module [...]

  2. Hello LoadModule rewrite_module modules/mod_rewrite.so
    is not there i open httpd.config and i can’t finde that lines i run
    a test.php to see if PHP Version 5.2.5 they have on,

    Loaded Modules :

    core mod_access mod_auth mod_include mod_log_config mod_logio mod_env mod_expires mod_headers mod_setenvif mod_proxy proxy_connect proxy_ftp proxy_http mod_ssl prefork http_core mod_mime mod_status mod_autoindex mod_asis mod_info mod_suexec mod_cgi mod_negotiation mod_dir mod_imap mod_actions mod_userdir mod_alias mod_rewrite mod_so mod_auth_passthrough mod_bwlimited mod_fpcgid mod_php5

    and is there but still i cant make this works any help thanks Tom

  3. Are you sure that you followed all the steps? It should work. What exactly is your problem? Did you create a .htaccess file containing the right data in it?

Leave a Reply


* = required fields

  (will not be published)


XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Note: If you want to post CODE Snippets, please make them postable first!
(e.g. <br /> should be converted to &lt;br /&gt;)