Forum OpenACS Q&A: Response to Sitewide redirects, DNS and Moving a Site

Posted by Bob OConnor on

Todd's solution for sitewide redirect was

Use a filter....:

ns_register_proc GET / martigny_redirect 

proc martigny_redirect {} { 
append url_on_swissnet "" [ns_conn url] 
ns_returnredirect $url_on_swissnet 

So, My question is where does the ns_register_proc... go to make the redirect work?
I tried putting the first line above in .../parameters/nsatgn.tcl and got

Fatal: config: script error: invalid command
 name "ns_register_proc" while executing...

Can I assume that the proc itself goes into
.../tcl/ad-defs.tcl.preload ?

Thank you.... I look forward to your answers as I need to implement this in production in 14 hours!