You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jérémie Balcaen <je...@c-w.be> on 2007/11/26 14:48:45 UTC

[users@httpd] mod_jk and mod_rewrite

 

Hello, 

 

I want to combine mod_jk and mod_rewrite in Apache to send a rewritten URL to Tomcat.

 

Original URL : http://localhost/oasys/init

Rewritten URL : http://localhost/cwsoft/init

 

 

Since I want to forward the rewritten URL, I need to add the PT flag to the rewrite rule:

 

RewriteEngine on 

RewriteRule   ^/oasys/init$   /cwsoft/init [PT,L] 

 

But how can I apply the mod_jk rule to the original URL ?

 

I add this line:

 

JkMount /oasys/* tomcatserver 

 

but it does not work.

 

I can only add a rule on the rewritten URL. (with JkMount /cwsoft/* tomcatserver)

 

Is anybody have an idea how I can do that ?

 

If it is not possible, must I rewrite the URL in Tomcat ?

 

 

Jérémie


Re: [users@httpd] mod_jk and mod_rewrite

Posted by GK...@symcor.com.
You are rewriting /oasys/init --> /cwsoft/init

Then JkMount /oasys/* tomcatserver  doesn't apply  because the url become:
/cwsoft/init

You need to change it to:
JkMount /cwsoft/init/* tomcatserver

Gabriel



                                                                           
             Jérémie Balcaen                                               
             <jeremie.balcaen@                                             
             c-w.be>                                                    To 
                                       <us...@httpd.apache.org>            
             26/11/2007 08:48                                           cc 
             AM                                                            
                                                                   Subject 
                                       [users@httpd] mod_jk and            
             Please respond to         mod_rewrite                         
             users@httpd.apach                                             
                   e.org                                                   
                                                                           
                                                                           
                                                                           
                                                                           





Hello,

I want to combine mod_jk and mod_rewrite in Apache to send a rewritten URL
to Tomcat.

Original URL : http://localhost/oasys/init
Rewritten URL : http://localhost/cwsoft/init


Since I want to forward the rewritten URL, I need to add the PT flag to the
rewrite rule:

RewriteEngine on
RewriteRule   ^/oasys/init$   /cwsoft/init [PT,L]

But how can I apply the mod_jk rule to the original URL ?

I add this line:

JkMount /oasys/* tomcatserver

but it does not work.

I can only add a rule on the rewritten URL. (with JkMount /cwsoft/*
tomcatserver)

Is anybody have an idea how I can do that ?

If it is not possible, must I rewrite the URL in Tomcat ?


Jérémie


---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org