tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harri Varpanen <havar...@cc.jyu.fi>
Subject Re: mod_jk & mod_rewrite
Date Tue, 29 Jan 2002 20:08:16 GMT

Thanks for your help Bernd, but it didn't work quite as expected. It 
redirected me to tomcat root instead of [tomcat-root]/myapp/main and 
showed "http://myapp.com/index.html" in the browser's location field.

Above, "main" is a servlet mapping to a dispatcher servlet, the workings 
of which depends on its pathinfo. I want that users could request 
"http://myapp.com/[pathinfo]", the effect of which would be the same as
"http://myapp.com:8080/myapp/main/[pathinfo]", but without the user seeing 
anything else than the request he or she made.

Snif. :(

Harri

On Tue, 29 Jan 2002, Bernd Koecke wrote:

> Hi Harri,
> 
> I had a similar problem. I added the flags [PT,L] and the right ordering 
> in the httpd.conf solved it for me. The L-flag stops the processing of 
> mod_rewrite. May be it is also necessary if you have only one rewrite 
> rule, if there are default rules. I didn't try it without the PT-flag. 
> It may be necessary, because it has something to do with handling uri 
> and filename fields.
> 
> After this I wrote the LoadModule directive for mod_jk as the first one, 
> put a ClearModuleList at the beginning of the AddModule-lines, put 
> AddModule mod_jk.c as the first AddModule-directive, and it works.
> 
> Hope this helps.
> 
> Bernd
> 
> Harri Varpanen wrote:
> 
> > Hi Folks,
> > 
> > Is it possible to somehow rewrite an URL internally to a JkMounted 
> > location? I tried this in httpd.conf:
> > 
> > JkMount /myapp/* ajp12
> > RewriteEngine on
> > RewriteRule ^/$ /myapp/main/ 
> > 
> > without any success (404). Putting [R] after the rewrite rule works, but 
> > I want that users see only the root url, http://myapp.com/ instead of 
> > http://myapp.com/myapp/main/.
> > 
> > I'm using Apache 1.3.20 with Tomcat 3.2.3 on FreeBSD. An upgrade maybe? :)
> > 
> > Regards,
> > 
> > Harri
> > 
> 
> 
> 
> -- 
> Dipl.-Inform. Bernd Koecke
> UNIX-Entwicklung
> Schlund+Partner AG
> Fon: +49-721-91374-0
> E-Mail: bk@schlund.de





--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message