[thelist] Apache rewrite rules not matched

Martin Tsachev shaggy at members.evolt.org
Tue Apr 16 12:26:01 CDT 2002


I have the following problem with mod_rewrite at my m.e.o. account:
some of my RewriteRules are not matched.
eg. matched at evolt:

RewriteRule download/send.php - [L]
RewriteRule download/(.+)$ /shaggy/download/send.php?file=$1 [L]

but locally I can also do it like

RewriteRule ^download/send.php - [L]
RewriteRule ^download/(.+)$ /shaggy/download/send.php?file=$1 [L]

or

RewriteRule ^/shaggy/download/send.php - [L]
RewriteRule ^/shaggy/download/(.+)$ /shaggy/download/send.php?file=$1 [L]

I tried some tweaking with the RewriteBase but it doesn't help.

Also I have the trailing slash problem locally I can have a RewriteRule that
solves it but only when using the last couple of rewrite rules, I also have 2
more rules that may conflict( I hope I'll be able to deal with them if someone
can help me on these here).

I'm using Apache 1.3.24 with PHP 4.1.2 on NetBSD 1.5.2, the evolt server runs
Apache 1.3.23 with PHP 4.1.2 but I don't think this is the reason as I also had
problems before when running the same version of Apache with rewrite rules
matched only locally( unfortunately I can't remember anything particular to
provide as example).

Some of the rules *do not always* work in the windows port of Apache(
precompiled binary with dynamic mod_rewrite) - i.e. they work sometimes.

--------------------------------------------

Martin Tsachev
http://members.evolt.org/shaggy/





More information about the thelist mailing list