Web Servers on Unix and Linux - rewrite directives are being ignored

This is Interesting: Free IT Magazines  
Home > Archive > Web Servers on Unix and Linux > September 2004 > rewrite directives are being ignored





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author rewrite directives are being ignored
Dan Wilga

2004-09-08, 5:49 pm

I have an httpd.conf that I migrated from Apache 1.3.x to 2.0.50. I just
noticed that the rewrite rules in it (which had worked all along) are
apparently being ignored now, and I'm not sure why.

I set up a simple test case:

RewriteEngine on
RewriteRule tst/env\.mperl$ /cgi/env.mperl [E=MY_TEST:test,PT]

which should cause attempts to access http://myserver/tst/env.mperl to
instead access http://myserver/cgi/env.mperl, but this doesn't seem to
work.

I even added:

RewriteLog /var/log/httpd/rewrite
RewriteLogLevel 3

and when I try to access the URL, I get nothing in the log. Even if my
rule wasn't matching, I should get *something* in the log at level 3.
The server-info module shows that this part of the config is indeed
getting loaded.

If I instead put the lines above into a top-level .htaccess file,
everything works as expected. I also get entries in the log.

--
Dan Wilga dwilga-MUNGE@mtholyoke.edu
** Remove the -MUNGE in my address to reply **
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com