httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wei-min Lee <>
Subject [users@httpd] combining conflicting rewrite rules
Date Thu, 04 Sep 2014 20:35:34 GMT

I have Apache 2.4 in front of Tomcat 6 hosting sites developed with

I'm using Apache to proxy ajp as well as rewrite in my vhost config the
following ways...

RewriteEngine on
RewriteRule ^/main/(.*) /$1 [L,R=301]
RewriteRule ^/html/main/(.*) /$1 [L,R=301]
RewriteRule ^/$ / [L,R=301]
RewriteRule ^/folderx/$ /folderx/index.html [L,R=301]

ProxyPreserveHost On
ProxyPass /folderx/ ajp://
ProxyPass /main-resources/ ajp://
ProxyPass /main-assets/ ajp://
ProxyPass / ajp://

Everything is working as desired, but now I'm trying to introduce page type
rewrites with exceptions to the main rule.  Meaning...

1 - all requests for .html?$, .aspx?$, etc, should be rewritten as $
2 - exclude /folderx/(.*)\.html?$ from rule 1

Any guidance and/or critiques to what I have so far would be appreciated.


View raw message