[opencms-dev] 301 redirect
Tobias Knierim
knierim at codecentric.de
Mon Oct 12 12:09:36 CEST 2009
Thank you, this works perfectly!
Regards
-----Ursprüngliche Nachricht-----
Von: Olaitan Olamilehin [mailto:olaitan.olamilehin at moremr.com]
Gesendet: Montag, 12. Oktober 2009 10:29
An: The OpenCms mailing list
Betreff: Re: [opencms-dev] 301 redirect
Hi,
You have to set it through the CmsJspBean using CmsJspBean.setStatus()
and CmsJspBean.getResponse().setHeader() methods.
Regards
On Mon, 2009-10-12 at 09:53 +0200, Tobias Knierim wrote:
> Hi there,
>
> I have a problem with a redirect in OpenCMS 6.5.6.
> A response.sendRedirect(location) gives me a 302. But I want to achieve a 301 redirect.
>
> Modifying the header doesn't seem to work:
>
> HttpServletResponse response = (HttpServletResponse) pageContext.getResponse();
> response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY);
> response.setHeader("Location", location);
> response.setHeader("Connection", "close");
>
>
> Is this a problem of the CMSFlexResponse?
> Are there any ways to accomplish this redirect in OpenCMS?
>
>
> Mit freundlichen Grüßen / Best regards
>
>
> Tobias Knierim
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://lists.opencms.org/mailman/listinfo/opencms-dev
More information about the opencms-dev
mailing list