I want Cocoon to be able to do 301 MOVED_PERMANENTLY redirects, rather 
than the current 302 MOVED TEMPORARILY.

To try it out, I made the o.a.c.environment.http.HttpResponse.sendRedirect() do:
        this.res.setHeader("location", location);
        this.res.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY);
instead, which works.

I am now wondering whether this is something that could be added to the sitemap 
syntax, something like:
<map:redirect-to uri="blah" permanent="yes"/>
defaulting of course to permanent="no".

I've looked around, and it seems that I'd need to extend the 'Redirector' interface, 
perhaps adding a sendPermanentRedirect() method. But then there's quite a lot of 
code that would need to be changed - i.e. all of the classes that implement 
Redirector.

Any thoughts? Would it be useful?

Regards, Upayavira

Reply via email to