I have got an Apache and Tomcat running and that i use mod_jk to bind them. I've got a Tomcat worker known as "tc1" and also the following setup on my small VirtualHost:

JkMount   /* tc1
JkUnMount /*.png tc1
JkUnMount /*.gif tc1
JkUnMount /*.css tc1
JkUnMount /*.js tc1

This way Tomcat serves all demands apart those for static files.

Now I wish to use mod_rewrite and make a move quite simple for example:

RewriteEngine On
RewriteRule ^/foo$ /bar [L]

to rewrite the dynamic pageview at "/foo" to "/bar", however it does not work because all web addresses processed by mod_rewrite don't finish up into mod_jk.

I have browse the Apache Tomcat Connector documentation and attempted all the JkOptions but nothing transformed.

Does anybody understand how to solve this?

Does the mod_jk and mod_rewrite load order and terms ordering play any role in URL processing?

thanks

That's odd, because automatically a RewriteRule transmits a customer-side redirect, therefore the client should create a second request to /bar that ought to be caught because of your JkMount. Does your access log show show the request /foo and also the the request /bar also?

Do this rule rather:

RewriteRule ^/foo$ /bar [PT,L]

The "PT" means "pass-through", and it is a rewrite bodge which enables you to definitely mutate the URL in situ and allows other modules obtain a try looking in, without delivering a redirect.