Return-Path: X-Original-To: apmail-httpd-users-archive@www.apache.org Delivered-To: apmail-httpd-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 48B8674A7 for ; Sat, 16 Jul 2011 16:55:57 +0000 (UTC) Received: (qmail 4848 invoked by uid 500); 16 Jul 2011 16:55:53 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 4637 invoked by uid 500); 16 Jul 2011 16:55:53 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 4425 invoked by uid 99); 16 Jul 2011 16:55:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 16 Jul 2011 16:55:52 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jakov.sosic@srce.hr designates 161.53.2.69 as permitted sender) Received: from [161.53.2.69] (HELO smtp.srce.hr) (161.53.2.69) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 16 Jul 2011 16:55:45 +0000 Received: from localhost (localhost [127.0.0.1]) by smtp.srce.hr (Postfix) with ESMTP id 8F20F15D7A2 for ; Sat, 16 Jul 2011 18:55:23 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at regoc.srce.hr Received: from smtp.srce.hr ([127.0.0.1]) by localhost (regoc.srce.hr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ce3OaHdOP1Zp for ; Sat, 16 Jul 2011 18:55:20 +0200 (CEST) Received: from nb-jsosic.srce.hr (cvpn109.srce.hr [161.53.1.109]) by smtp.srce.hr (Postfix) with ESMTPSA id 643E315D75C for ; Sat, 16 Jul 2011 18:55:20 +0200 (CEST) Message-ID: <4E21C277.6070200@srce.hr> Date: Sat, 16 Jul 2011 18:55:19 +0200 From: Jakov Sosic Organization: Srce User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110621 Fedora/3.1.11-1.fc14 Lightning/1.0b3pre Thunderbird/3.1.11 MIME-Version: 1.0 To: users@httpd.apache.org References: <4E20C695.1030805@srce.hr> <4E20CA6F.2070809@srce.hr> In-Reply-To: <4E20CA6F.2070809@srce.hr> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] Rewrite & JkMount 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: >> >> >> ServerName app.example.com >> >> RewriteEngine on >> RewriteCond %{REQUEST_URI} ^/app >> RewriteRule ^$ /app/ [P] >> >> JkMount /app* loadbalancer >> >> >> 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 for more info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org " from the digest: users-digest-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org