Forum OpenACS Q&A: Re: Best way to do HTTP 3xx Redirections?

Collapse
Posted by Michael Bluett on
I am just about to put my first OpenACS sites live (two sites on the same IP using AOLServer 3.3 and Jerry Asher's vhr patch).

I noticed that if you create a file called "index.vuh" in the root, then this file then becomes the default "file not found" file due to some action of the request processor. This may not be a desired behaviour of the processor.

Anyway, a bit of 301 redirecting code:

set headers [ns_set new myheaders]
ns_set put $headers location "http://somehost.com/somepage.html"
ns_respond -status 301 -type text/plain -string "redirect" -headers $headers