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.
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% [?]
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”
Leave a Reply






[...] 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 [...]
[...] 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? [...]
THNX, I NEEDED THE STUFF.
[...] 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? [...]
Thanks! It worked!