How to check and enable mod_rewrite module in apache

Posted on April 7, 2008 
Filed Under how-to, htaccess, tips and technique, tutorial

Well, I’ve got around 15 emails asking from readers, how to check the mod_rewrite module in apache and enable mod_rewrite module in apache after reading two most of the popular post of this blog 5 useful url rewriting examples and hide .php extension with url rewriting.

How to check weather mod_rewrite module is enabled or not?

Well there are lots of technique to check this but I’ll show you a very simple technique to check weather mod_rewrite module is enabled or not in you web server.

1) Type <?php phpinfo(); ?> in a php file and save it and run that file in the server.
2) And now you can the list of information, just search the word “mod_rewrite” from the browser’s search menu
3) If it is found under the “Loaded Modules” section then this module is already loaded as you see in the picture below, otherwise you need to go to the next step for enabling mod_rewrite module.

check mod rewrite module

How to enable mod_rewrite module in apache in xampp, wamp?

Now, I’ll show you how to enable how to mod_rewrite module in apache installed under windows environment.
1) Find the “httpd.conf” file under the “conf” folder inside the Apache’s installation folder.
2) Find the following line “#LoadModule rewrite_module modules/mod_rewrite.so” in the “httpd.conf” file.You can do this easily by searching the keyword “mod_rewrite” from find menu.
3) Remove the “#” at the starting of the line, “#” represents that line is commented.
4) Now restart the apache server.
5) You can see now “mod_rewrite” in the Loaded Module section while doing “phpinfo()”.

Popularity: 20% [?]

Enter your email address and get recent tutorials, tips, tricks and scripts of PHP, Ajax, JavaScript and CSS directly delivered to you email inbox:

Follow me on twitter at http://twitter.com/roshanbh.

Related Posts

» Hide .php extension with url rewriting using .htaccess
» Get free ebooks of essential PHP and JavaScript tips , tricks & Hacks
» How to know and handle disabled javascript in browser
» Need loans for your IT Company??

Comments

5 Responses to “How to check and enable mod_rewrite module in apache”

  1. AJAX coding school » Blog Archive » AJAX Examples [2008-04-07 07:46:31] on April 7th, 2008 7:50 am

    [...] How to check and enable mod_rewrite module in apache By Roshan Well, I’ve got around 15 emails asking from readers, how to check the mod_rewrite module in apache and enable mod_rewrite module in apache after reading two most of the popular post of this blog 5 useful url rewriting examples and hide … Roshan Bhattarai’s Blog - PHP… - http://roshanbh.com.np [...]

  2. Hide .php extension with url rewriting using .htaccess on April 7th, 2008 9:13 am

    [...] To rewrite the URL you must have the mod_rewrite module must be loaded in apache server. And furthermore, FollowSymLinks options also need to be enabled otherwise you may encounter 500 Internal Sever Error. If you don’t know much about mod_rewrite module then please check this post to know how to check and enable mod_rewrite module in apache? [...]

  3. salman Ahmad on April 15th, 2008 12:17 pm

    THNX, I NEEDED THE STUFF.

  4. Hide .php extension with url rewriting using .htaccess - Huy’s Blog on June 21st, 2008 12:04 pm

    [...] To rewrite the URL you must have the mod_rewrite module must be loaded in apache server. And furthermore, FollowSymLinks options also need to be enabled otherwise you may encounter 500 Internal Sever Error. If you don’t know much about mod_rewrite module then please check this post to know how to check and enable mod_rewrite module in apache? [...]

  5. Edmund on August 5th, 2008 3:55 am

    Thanks! It worked! :)

Leave a Reply