I am working on a website, and I have made it so that when not logged in the visitor is taken to a holding page by setting an id for when the website is unavailable.
However I am now logged in and I can access my homepage(1) and the domain is example.com, but if I go to www.example.com it takes me to the holding page instead.
I have links on the page but instead of going to their page I am taken to the holding page with domain:
http://www.example.com/index.php?q=my-new-page.html
I have Friendly URLs turned on, is this caused by it and .htaccess?
Follow me on twitter @christofvonlee
-
☆ A M B ☆
- 24,524 Posts
www.domain.com is a different subdomain than domain.com, this is a function of setting the session cookies. The session cookie is only good for the exact subdomain.
You can adjust the session_cookie_domain in the System Settings. Use something like ".domain.com" to allow the cookie to be used by all subdomains of domain.com
How about uncommenting the part of .htaccess that would force www.domain.com -> domain.com. That way, all users would be under the same domain.
Thanks for the replies.
I edited the .htaccess and uncommented the line to force visitors to the www. site. Then it logged me out, after logging back in everything seemed to work.
I cant say for sure it was the .htaccess or caching in the browser but sorted now.
Follow me on twitter @christofvonlee
I'm almost certain it was the .htaccess file. I'm glad you got it sorted.