You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Daniel Rhoden <dr...@iiwinc.com> on 2005/02/11 15:45:45 UTC

301 permanent redirects in Tomcat - how to achieve

In an environment totally hosted by Tomcat, how does one accomplish a 
301 permanent redirect? What is the equivalent of ".htaccess" in 
Tomcat?  Can 301 redirects be defined in web.xml?

I am changing technology and don't want my site to loose its page rank. 
Example:
mydomain\currentfolder\samefilename.jsp
  needs to be redirected to:
mydomain\newfolder\samefilename.jsp

Thanks,

Daniel


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: 301 permanent redirects in Tomcat - how to achieve

Posted by Roberto Cosenza <ro...@gmail.com>.
Put apache in front of it, You will gain in flexibility.


On Fri, 11 Feb 2005 08:52:03 -0600, Jason Bainbridge
<jb...@gmail.com> wrote:
> On Fri, 11 Feb 2005 09:45:45 -0500, Daniel Rhoden <dr...@iiwinc.com> wrote:
> > In an environment totally hosted by Tomcat, how does one accomplish a
> > 301 permanent redirect? What is the equivalent of ".htaccess" in
> > Tomcat?  Can 301 redirects be defined in web.xml?
> 
> I think you are going to have to do this in a roundabout way with
> something similar to the solution here:
> 
> http://www.sitepoint.com/forums/showthread.php?t=231044
> 
> Regards.
> --
> Jason Bainbridge
> KDE - Conquer Your Desktop - http://kde.org
> KDE Web Team - webmaster@kde
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 


-- 
Roberto Cosenza
http://robcos.com

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: 301 permanent redirects in Tomcat - how to achieve

Posted by Jason Bainbridge <jb...@gmail.com>.
On Fri, 11 Feb 2005 10:09:03 -0500, Daniel Rhoden <dr...@iiwinc.com> wrote:
> Thank you very much for that.  It looks like where I mess up was not
> making it a 404 error page first.  I was actually creating a jsp with
> the exact name and trying to change the status the same way documented
> in the post.
> 
> Just curious, but how did you locate that so quickly?

Googled for:

tomcat 301 redirect

It's the third result and plus I've done similar things before but I
usually only store the pointers to information away in my head so I
know how to retrieve it, hence the Google. :)


-- 
Jason Bainbridge
KDE - Conquer Your Desktop - http://kde.org
KDE Web Team - webmaster@kde

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: 301 permanent redirects in Tomcat - how to achieve

Posted by Jason Bainbridge <jb...@gmail.com>.
On Fri, 11 Feb 2005 09:45:45 -0500, Daniel Rhoden <dr...@iiwinc.com> wrote:
> In an environment totally hosted by Tomcat, how does one accomplish a
> 301 permanent redirect? What is the equivalent of ".htaccess" in
> Tomcat?  Can 301 redirects be defined in web.xml?

I think you are going to have to do this in a roundabout way with
something similar to the solution here:

http://www.sitepoint.com/forums/showthread.php?t=231044

Regards.
-- 
Jason Bainbridge
KDE - Conquer Your Desktop - http://kde.org
KDE Web Team - webmaster@kde

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org