I want to to a 301 permanent redirect via Freemarker template.
However, setting the status code is ignored, the redirect still always
redirects with a 302 code ("temporarily moved").
This is the code:
[code]
${ctx.response.setStatus(301)}
${ctx.response.sendRedirect("${content.externalLink}")}
[/code]
I know I could use VirtualURIMapping and the "permanent:" directive, but I need
to redirect dynamically to editable URLs set by authors.
(I'm on Magnolia 5.4.1 CE).
Thanks.
--
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]>
----------------------------------------------------------------