Forum OpenACS Q&A: recirect of certain subsites...

Collapse
Posted by David Kuczek on
I have ForceHostP set to 0 in my oacs 3.2.5 parameter file...

I have one subsite (subsite.mysite.com) and one main site (mysite.com)...

I would like to redirect all users that access the main site via
www.mysite.com directly to mysite.com so that they always have the
cookie set to mysite.com and not to www.mysite.com or both. What would
I have to do?

Collapse
Posted by Jonathan Ellis on
have a filter do exactly what sec_read_security_info does with ForceHostP on, except you'll only want to redirect if the requested host is www.mysite.com.  pretty simple change.  In fact I'd just hack sec_read_security_info to check another parameter, HostsToForce (maybe you want to generalize to a list) when ForceHostP=1.