You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Andrew Hole <an...@gmail.com> on 2007/12/03 12:02:37 UTC

Redirect

Hello!

On an Apache server, I would like to have a Redirect from a URL to
other URL not on my server. The redirect is temporary, and therefore I
would prefer if the original URL appeared in the visitor's browser's
Address Bar, as opposed to the URL of the site to which he/she was
redirected.

Is it possible?

Thanks a lot

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Redirect

Posted by Martin Gainty <mg...@hotmail.com>.
+1 I agree with Rainier

You may want to consider returning 302 supplying the new Location URI field
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

implementation example available at
http://developers.sun.com/mobility/reference/techart/design_guidelines/http_
redirection.html

Viel Gluck
Martin

----- Original Message -----
From: "Rainer Jung" <ra...@kippdata.de>
To: "Tomcat Users List" <us...@tomcat.apache.org>
Sent: Monday, December 03, 2007 6:10 AM
Subject: Re: Redirect


> Andrew Hole wrote:
> > Hello!
> >
> > On an Apache server, I would like to have a Redirect from a URL to
> > other URL not on my server. The redirect is temporary, and therefore I
> > would prefer if the original URL appeared in the visitor's browser's
> > Address Bar, as opposed to the URL of the site to which he/she was
> > redirected.
> >
> > Is it possible?
> >
> > Thanks a lot
>
> This question better belongs to the httpd users list.
>
> Have a look at mod_rewrite, and in case you need to combine this with
> mod_jk, you need to set the PT flag in the rule.
>
> http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html
>
> You can also do some basic URL transformation with mod_proxy:
>
> http://httpd.apache.org/docs/2.2/mod/mod_proxy.html
>
> Regards,
>
> Rainer
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Redirect

Posted by Rainer Jung <ra...@kippdata.de>.
Andrew Hole wrote:
> Hello!
> 
> On an Apache server, I would like to have a Redirect from a URL to
> other URL not on my server. The redirect is temporary, and therefore I
> would prefer if the original URL appeared in the visitor's browser's
> Address Bar, as opposed to the URL of the site to which he/she was
> redirected.
> 
> Is it possible?
> 
> Thanks a lot

This question better belongs to the httpd users list.

Have a look at mod_rewrite, and in case you need to combine this with 
mod_jk, you need to set the PT flag in the rule.

http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html

You can also do some basic URL transformation with mod_proxy:

http://httpd.apache.org/docs/2.2/mod/mod_proxy.html

Regards,

Rainer

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org