[opencms-dev] 301 redirect

Tobias Knierim knierim at codecentric.de
Mon Oct 12 09:53:48 CEST 2009


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



More information about the opencms-dev mailing list