optional www. causing login woes

I'm developing a siteframe 3.2.2 section for an existing website. The web site url can be either mysite.net or www.mysite.net - the www is optional. If one does not put in the www, it sometimes appears in the URL as displayed by the browser, sometimes not. The Siteframe area is in mysite.net/somefolder. Occasionally while working within Siteframe, the www gets added on - and then the current login no longer appears to be operational. E.g., while logged in as admin, I might click on "control panel" and get a "you must be logged in as admin" error page. But on that page too there is a link to the control panel, and if I click on that it lets me in. I've found out that the difference is the www in the link URL. If I add the www to the "site URL" in Siteframe's basic settings, then even the link in that subpage fails to let me in, but if I remove the www manually from the URL then it does let me in. I am also worried that site users may get "logged out" at random times due to this issue. Any way to resolve this? Thanks.

login cookie
by glen / at 09:25 on December 13, 2006

The login cookie is based upon the domain relative to where you logged in. If you login at www.example.com, then the cookie will NOT be visible at example.com. However, if you login at example.com, then it should be visible at www.example.com. The change comes about because sometimes the site URL (set in Basic Properties) is used in the links. Personally, I'd pick one or the other and not make it optional. On my sites, I have a redirect rule: for example, www.siteframe.org redirects to siteframe.org.