Hi Matt, See configuration below.  I hope this helps you - Clay

Test Cases for Requirement #1
http://www.domain.com/?v=1                                      ->
http://www.domain.com/1
http://www.domain.com/?v=2                                      ->
http://www.domain.com/2

Test Cases for Requirement #2
http://www.domain.com/?q=foo&v=1                     ->
http://www.domain.com/1
http://www.domain.com/?v=1&q=foo                     ->
http://www.domain.com/1
http://www.domain.com/?p=bar&v=1&q=foo         -> http://www.domain.com/1

#mod_proxy_ajp, mod_proxy_balancer and mod_rewrite configuration

#webapp1 or webapp2 are deployed
RewriteCond    %{QUERY_STRING}          (.*)v=(1|2)      
RewriteRule     ^(.*)$                                 /%2/? [L,R]

#default to webapp1  for anything else
RewriteCond    %{QUERY_STRING}           (.*)v=([^12])    
RewriteRule     ^(.*)$                                 /1/?   [L,R]


<Proxy balancer://cluster >
    BalancerMember ajp://localhost:8009 route=tomcat1 
    #BalancerMember ajp://localhost:8010 route=tomcat2
</Proxy>

<Location /1 >
    ProxyPass balancer://cluster/servlets-examples
</Location>

<Location /2 >
    ProxyPass balancer://cluster/jsp-examples
</Location>


-- 
View this message in context: 
http://www.nabble.com/Mixing-Apache%27s-mod_rewrite-with-mod_proxy-tf3587361.html#a10063037
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to