On 07/16/2011 01:17 AM, Jakov Sosic wrote: > On 07/16/2011 01:00 AM, Jakov Sosic wrote: >> Hi. >> >> I'm trying to set up the following scenario: >> >> <VirtualHost *:80> >> ServerName app.example.com >> >> RewriteEngine on >> RewriteCond %{REQUEST_URI} ^/app >> RewriteRule ^$ /app/ [P] >> >> JkMount /app* loadbalancer >> </VirtualHost> >> >> So what I want is to redirect app.example.com and >> app.example.com/whatever to that JkMount... >> >> What am I doing wrong? I tried without RewriteCond but no luck either... >> >> > > OK it seems that I solved the problem... > > This is a solution: > > # Redirect to webchat > RewriteEngine on > RewriteCond %{REQUEST_URI} !^/(app|jkstatus)(/)?$ > RewriteRule ^.*$ /app [PT] > > > so now everything is redirected to app.example.com/app, even if user > tries to go to app.example.com/appppppppppppppppppppp -> apache > redirects it to /app (JkMount). OK I had one more thing to fix up... Cond rule did not work flawlessly, this is a final soultion: # Redirect to webchat RewriteEngine on RewriteCond %{REQUEST_URI} !^/(webchat|jkstatus)(/.*)?$ RewriteRule ^.*$ /webchat [PT] Thing is, if REQUEST_URI was /webchat/something?something, then mod_rewrite would rewrite it to /webchat... With (/.*)? I just skip rewriting for anything that starts with /webchat/ -- Jakov Sosic www.srce.hr --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx