Hi everyone,
I just got to this topic looking for a way to redirect through FreeMarker and
there is actually a way to use permanent redirect as well.
But we can not use sendRedirect here, because it's a shortcut for a temporary
redirect (have a look at Javadoc here
[url]https://tomcat.apache.org/tomcat-5.5-doc/servletapi/javax/servlet/http/HttpServletResponse.html#sendRedirect(java.lang.String)[/url]).
So here is the code for permanent redirect:
[code]
${ctx.response.setStatus(301)}
${ctx.response.setHeader("Location", "${content.externalLink}");
[/code]
Regards,
Vincent
--
Context is everything:
http://forum.magnolia-cms.com/forum/thread.html?threadId=7c60af4b-1330-41f9-8cb1-096f21ffa622
----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------