Apache Mod_rewrite Mystery

Hi Folks,

I am running on a CentOS 6.3 server, whose primary function until recently has been my Zimbra mail server exclusively. I added wordpress and I have not been disappointed, with this one exception of Apache mod_rewrite. I have already tried to set selinux to permisive to eliminate that as a culprit and I am happy to say that I believe this has nothing to do with selinux.

/server-info/ tells me that mod_rewrite is enabled, which is good because that is what I intended. I have an .htaccess file in my wordpress root directory that looks like this:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /icarus/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /icarus/index.php [L]
RewriteLog "/etc/httpd/logs/rewrite_log"
RewriteLogLevel 9
</IfModule>
# END WordPress

Some observations:

  1. This doesn't work, meaning if I ask for a link, error_log reports "404 289" and I understand "404", but not "289"
  2. I tried to enable rewrite logging, and I get no log. So, that's not helping me much.
  3. I get no other complaints from any other components in any other logs that I can find.

Does anybody have any explanation for "289" or reasons why I can't get rewrite logging to help me?

Thanks for the help,

Chris.

The 289 is the response length in bytes, I believe.

Hi Corona688,

Thanks, that is helpful to the extent that I can't learn anything about the solution to my problem. Any insight into any of the other mysteries?

Thanks for the help,

Chris.

Out of curiosity, what happens when you remove the <IfModule> </IfModule> brackets?

It's possible that apache has not been configured to allow you to use these options in .htaccess.

Also, could you explain the intent of these rewrite rules?

Hi Corona688,

No effect... I am running this web site as a guest on a server running Zimbra, which is quite complicated and uses lots of toys in obscure ways that I don't fully understand. I am running a separate instance of Apache, but I am beginning to believe I am fighting with Zimbra more than Apache. I have decide to live with what I have until I can put up a different server for this. It is not worth fighting with my mail server and possibly breaking that, when I can simply move this web site.

Thanks for the help.

Chris.

I cannot conceive of how the virtual host would prevent a guest OS from reading their own .htaccess. I suspect switching to an outside host would only be an exercise in further frustration.

What you can do in an .htaccess file is often limited, apache may be ignoring these options, if you can't find a way to enable these options in apache's conf files then try an appropriate host section in apache's conf.d instead.