You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Christophe Andreoli <an...@gsf.de> on 2004/06/09 10:20:03 UTC
[Fwd: tomcat url rewriting protblem]
-------- Original Message --------
Subject: tomcat url rewriting protblem
Date: Tue, 08 Jun 2004 15:41:10 +0200
From: Christophe Andreoli <an...@gsf.de>
Reply-To: "Tomcat Users List" <to...@jakarta.apache.org>,
andreoli@gsf.de
Organization: Institute of Human Genetics
To: Tomcat Users List <to...@jakarta.apache.org>
Hello !
I just would like to redirect /mitop to /mitop2
I wrote in httpd.conf
RewriteEngine On
RewriteLog "/logs/rewrite.log"
RewriteRule ^/mitop /mitop2
I doesn't work and when I look at access.log , I see:
[08/Jun/2004:15:38:35 +0200]
- - [08/Jun/2004:15:38:35 +0200] "GET /mitop HTTP/1.1" 302 659
- - [08/Jun/2004:15:38:35 +0200] "GET /mitop/ HTTP/1.1" 302 659
- - [08/Jun/2004:15:38:35 +0200] "GET /mitop/start.jsp HTTP/1.1" 200
I seems that /mitop is rather redirected to /mitop/start.jsp
due to the welcome-file tag in web.xml
<welcome-file-list>
<welcome-file>start.jsp</welcome-file>
</welcome-file-list>
Do you know how I can redirect rather to /mitop2 ?
Thanks !
Christoph
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: [Fwd: tomcat url rewriting protblem]
Posted by Christophe Andreoli <an...@gsf.de>.
Hi David,
thank you for the answer.I know it's a apche topic.
I just thought that tomcat disturs the url rewrite ruling
christophe
> You do realize this is very off topic as it's an Apache httpd issue,
> > not a Tomcat issue. The question would be better asked on an
Apache > > web server list.
> At anyrate, I think you need to have the proper flags set at the end
> > of the RewriteRule:
> RewriteEngine On
> RewriteLog "/logs/rewrite.log"
> RewriteRule ^/mitop /mitop2 [R]
> or better yet:
> RewriteRule ^/mitop/(.*) /mitop2/$1 [R]
> The second one will rewrite even direct URLs someone might have in a
> > bookmarks file.
> Check out these pages for more info on mod_rewrite:
> http://httpd.apache.org/docs-2.0/mod/mod_rewrite.html
> http://httpd.apache.org/docs-2.0/misc/rewriteguide.html
> --David
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: [Fwd: tomcat url rewriting protblem]
Posted by Christophe Andreoli <an...@gsf.de>.
moreover [R] is not the reason,
as [R] is not necessary for the redirecting.
It just show in the browser that the url has been redirected
christophe
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: [Fwd: tomcat url rewriting protblem]
Posted by David Smith <dn...@cornell.edu>.
You do realize this is very off topic as it's an Apache httpd issue, not
a Tomcat issue. The question would be better asked on an Apache web
server list.
At anyrate, I think you need to have the proper flags set at the end of
the RewriteRule:
RewriteEngine On
RewriteLog "/logs/rewrite.log"
RewriteRule ^/mitop /mitop2 [R]
or better yet:
RewriteRule ^/mitop/(.*) /mitop2/$1 [R]
The second one will rewrite even direct URLs someone might have in a
bookmarks file.
Check out these pages for more info on mod_rewrite:
http://httpd.apache.org/docs-2.0/mod/mod_rewrite.html
http://httpd.apache.org/docs-2.0/misc/rewriteguide.html
--David
Christophe Andreoli wrote:
>
>
> -------- Original Message --------
> Subject: tomcat url rewriting protblem
> Date: Tue, 08 Jun 2004 15:41:10 +0200
> From: Christophe Andreoli <an...@gsf.de>
> Reply-To: "Tomcat Users List" <to...@jakarta.apache.org>,
> andreoli@gsf.de
> Organization: Institute of Human Genetics
> To: Tomcat Users List <to...@jakarta.apache.org>
>
> Hello !
>
>
> I just would like to redirect /mitop to /mitop2
>
>
> I wrote in httpd.conf
>
>
> RewriteEngine On
> RewriteLog "/logs/rewrite.log"
> RewriteRule ^/mitop /mitop2
>
>
> I doesn't work and when I look at access.log , I see:
>
>
>
>
> [08/Jun/2004:15:38:35 +0200]
>
> - - [08/Jun/2004:15:38:35 +0200] "GET /mitop HTTP/1.1" 302 659
> - - [08/Jun/2004:15:38:35 +0200] "GET /mitop/ HTTP/1.1" 302 659
> - - [08/Jun/2004:15:38:35 +0200] "GET /mitop/start.jsp HTTP/1.1" 200
>
>
> I seems that /mitop is rather redirected to /mitop/start.jsp
>
> due to the welcome-file tag in web.xml
>
> <welcome-file-list>
> <welcome-file>start.jsp</welcome-file>
> </welcome-file-list>
>
>
> Do you know how I can redirect rather to /mitop2 ?
>
>
>
> Thanks !
>
>
>
> Christoph
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org