tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Jung <>
Subject Re: [OT] Using httpd's mod_rewrite with mod_jk
Date Fri, 02 Jul 2010 14:13:57 GMT
On 02.07.2010 02:37, Christopher Schultz wrote:
> Hash: SHA1
> Rainer,
> On 7/1/2010 4:54 AM, Rainer Jung wrote:
>> Usually mod_rewrite is perfectly compatible with mod_jk. I must confess,
>> that I'm not 100% sure about the case, where you try to rewrite a
>> request that originally would have been handled by mod_jk to something
>> that should not be handled by it.
> It appears that my setup (rewriting a request that normally would go to
> jk to one that shouldn't go to jk) still ends up being handled by jk.
>> Two possibilities: if it doesn't actually work, you can set the env var
>> "no-jk" as a side effect in your rewrite rule. If mod_jk fins this env
>> var set, it will decline to handle the request. Alternatively, if you
>> are fine with redirecting by mod_rewrite instead of rewriting
>> internally, the redirecting should also win over mod_jk.
> Okay, I changed my RewriteRule to this:
>          RewriteRule .* /bad-browser.shtml [L,E=no-jk]

OK, I did a little test:

RewriteRule .* /bad-browser.shtml [L,E=no-jk:1]

should work. A quick glance at mod_rewrite's code indicates it drops E= 
rules when no value is present.

Have fun!


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message