Wordpress – Check mod_rewrite

by Srihari Padmanabhan on June 1, 2009

If you have Wordpress for sometime and tried customizing it for permalinks or any other server side settings, you could have ended up in a 404 error. This could be due to the failure in rewriting the .htaccess file by Wordpress or changes.  The mod_rewrite module is by default ON in most of the cases but there have been situations where error pages show up due to the missing Apache server settings. The state of mod_rewrite can be checked as follows:

If you are hosting your application in your local host or on a dedicated server, then it is a matter of editing ” httpd.conf ” file within Apache server folder.

Please ensure that:

“LoadModule rewrite_module modules/mod_rewrite.so” is NOT commented. In apache, # (pound sign) is used to comment text. So you need to remove the # sign if it appears before the above statement. Then again check if the following line is also not commented.

AddModule mod_rewrite.c

Once that is done, save the file and restart apache server for the changes to take place.

Test 1:
Easiest way to test if mod_rewrite is ON/OFF is to create a php info file

Under “apache2handler” check for “Loaded Modules” section. There will be a list of loaded modules. Check if mod_rewrite is present in the list.

Test 2:
By creating a file called .htaccess and then by typing the following lines in it

Options +FollowSymLinks
RewriteEngine On

Save the file. If you had created a virtual site “abc”, you need to save .htaccess file inside /abc folder. Then access the site by entering http://domain.com/abc. If mod_rewrite is ON, then you will not get any error in the display else, you will be getting “Server Error – 500″

Share and have fun:
  • Print
  • PDF
  • RSS
  • Reddit
  • Twitter
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google Bookmarks

You May Also Be Interested In...

Similar Posts Code Here

Subscribe Now

If you enjoyed this post, you will definitely enjoy our others. Subscribe to the feed to get instantly updated for those awesome posts soon to come.

Put whatever you want here!

{ 1 trackback }

Daily News About Wordpress : A few links about Wordpress - Sunday, 31 May 2009 23:58
June 1, 2009 at 7:23 AM

{ 3 comments… read them below or add one }

1 SonyaSunny July 18, 2009 at 8:15 AM

Thanks for article. Everytime like to read you.

Reply

2 Louis Vuitton Handbags August 5, 2009 at 12:17 AM

It is good information!

Reply

3 Louis Vuitton Handbags August 5, 2009 at 2:14 AM

It is good information! Thanks

Reply

Leave a Comment

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

Previous post: No more Axxo releases ?

Next post: Gmail – Gateway for Spam?