[opencms-dev] 301 redirect
Olaitan Olamilehin
olaitan.olamilehin at moremr.com
Mon Oct 12 10:28:41 CEST 2009
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
More information about the opencms-dev
mailing list