Odd? mod_rewrite behavior

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



All;

I have an application being proxied through Apache which is also serving some static content for the web application. The application is '/xyz(.*)' and the static content is '/xyz-static-content'. The requests for the static content come in as '/xyz_<version>' and have to be rewritten to '/xyz-static-content'.

I can successfully get both to work with the following rules:

RewriteRule ^xyz-static-content_[A-Z0-9a-z._-]+/(.*) xyz-static-content/$1
RewriteRule ^xyz/?$ xyz/ [C]
RewriteRule ^xyz/(.*) http://appserver:port/xzy/$1 [P]

However, the following set of rules does not work (the static content does not display):

RewriteRule ^xyz-static-content_[A-Z0-9a-z._-]+/(.*) xyz-static-content/$1 [L]
RewriteRule ^xzy(.*) http://appserver:port/xyz$1 [P]

It seems that even the 'xyz-static-content' requests are falling through to, and matching, the proxy statement despite the 'L|Last' flag. Can anyone explain this behavior? I'm trying to use the second set of rules to avoid having to rewrite the situation where the user requests just '/xyz' to '/xyz/'.

Thanks,
-Kimmel

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux