httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lesley Kimmel <ljkimme...@hotmail.com>
Subject [users@httpd] Odd? mod_rewrite behavior
Date Fri, 03 Oct 2014 17:31:59 GMT
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
 		 	   		  
Mime
View raw message