Apache Mod_rewrite Mystery


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Apache Mod_rewrite Mystery
# 1  
Old 05-03-2013
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:

Code:
# 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.
# 2  
Old 05-03-2013
The 289 is the response length in bytes, I believe.
# 3  
Old 05-03-2013
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.
# 4  
Old 05-04-2013
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?
# 5  
Old 05-04-2013
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.
# 6  
Old 05-04-2013
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.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Web Development

Mod_rewrite http to https

Hi Team, I have a question on the apache mod_rewrite module. I have a requirement of rewriting only specific url's to https. Requirement below:- want to match a word (test) on the url and if matches then it should rewrite to https. example:- ... (1 Reply)
Discussion started by: arumon
1 Replies

2. Shell Programming and Scripting

sort mystery

Hi everyone, I can't seem to understand the behavior of sort on a particular case. cat tmp25 1 a 10 b 20 c 2 d I do that: sort -k1,1 tmp25 1 a 10 b 2 d 20 c This one I understand, it's what i expected, from a string point of view 1<10<2<20 sort -k1... (9 Replies)
Discussion started by: a.brassac
9 Replies

3. Filesystems, Disks and Memory

I/O Error Mystery

I burned identical raw encrypted data to three cds using my new external Toshiba drive. My internal IBM read only drive does not get an I/O Error when reading in Circumstance #1, but does get an I/O Error in Circumstance #2. But, the Toshiba drive can do both circumstances without an error. ... (1 Reply)
Discussion started by: darkstarxor
1 Replies

4. Web Development

Apache mod_rewrite: from 'friendly' url to actual path

I'd like to translate a friendly url such as: http://www.xxxyyyzzz.com/page/12345678/ to: http://www.xxxyyyzzz.com/page/12/34/56/78/ Seems simple enough, but I cannot figure out how. Any one done this before? (2 Replies)
Discussion started by: markericksen
2 Replies

5. Web Development

mod_rewrite help

Here's my situation. When a user access the site domain.com it redirects to /portal which displays SKIN1 by default. When a user accesses the site domain.com/portal?branding=SKIN1 it displays SKIN1 by default as well. When a user access the site domain.com/portal?branding=SKIN2 it... (0 Replies)
Discussion started by: Adrnalnrsh
0 Replies

6. UNIX for Advanced & Expert Users

A perplexing mystery

A perplexing mystery... please note that i am not a lacky, and the error below is misleading recently something i do all the time broke (a script). now when i run this script i get this error. /usr/bin/awk: 0403-027 The parameter list is too long. note that the (parameter list is... (9 Replies)
Discussion started by: nullwhat
9 Replies

7. Shell Programming and Scripting

mod_rewrite problem

hi i'm very new to mod_rewrite. I can't seem to have this work. I have a site which has 4 pages : home, links, adverts and contacts page. the adverts page is linked to this url http://www.xxxxxx.com/adverts.php. What i want is that whenever the adverts page is clicked , it will show... (0 Replies)
Discussion started by: arsonist
0 Replies

8. Solaris

The Mystery Directory

Hello Everyone, I am currently running a large Server with Veritas Volumen Manager, attached to a EMC. uname -a SunOS 5.8 Generic_117350-47 sun4u sparc SUNW,Sun-Fire-880 I have one directory that tends to change to a file.Once in a while and always in different time.The file is the... (1 Reply)
Discussion started by: Peterh
1 Replies
Login or Register to Ask a Question