Getting apache mod_status and mod_info to play nicely with wordpress…..

datePosted on 15:15, February 17th, 2012 by Many Ayromlou

After reading many (too many) posts about this subject that did not work, I finally found a way to get this working. If you have a wordpress site setup you will, at some point during the installation, be told to copy a bunch of “redirect” code to your .htaccess file in your wordpress installation folder. These apache redirects take care of making pretty URL’s and permalinks amongst other things. The problem is that these .htaccess rules in wordpress take over server-info and server-status urls activated in apache’s config and return a page not found error.

I came across numerous sites that suggested adding a rule like:

RewriteCond %{REQUEST_URI} !=/server-status

This didn’t work for me. I’m not sure if the multisite version of wordpress (which I’m using) is causing this. The rule that worked beautifully is the following:

RewriteRule ^(server-info|server-status) - [L]

This rule stops the rewrite engine whenever server-info or server-status is parsed as part of the URL. So my .htaccess looks like this now:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# Stop Processing if you see server-info or server-status
RewriteRule ^(server-info|server-status) - [L]
# The Rewrite Condition below did not work
# RewriteCond %{REQUEST_URI} !=/server-status
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . index.php [L]
# END WordPress
categoryPosted in Apache, wordpress | printPrint

2 Responses to “Getting apache mod_status and mod_info to play nicely with wordpress…..”

  1. Andrew Fuchs on November 5th, 2013 at 00:49

    Thank you Many..this was fucking killing me…!

  2. happy on April 20th, 2014 at 14:35

    exactly what I’ve been looking for, thanks a bunch.

Leave a Reply

You must be logged in to post a comment.