can I have my domain authenticated for regualr domain and www.mydomain?
How can I have user automatically logs in to my website if he goes to mydomain.com or w开发者_开发知识库ww.mydomain.com?
The problem is that cookies set on the main domain are not automatically accessible on the subdomain. Authentication in your application is handled through sessions, which are persisted between requests by a cookie. That the cookie should be accessible to your subdomains has to be set explicitly when the cookie is related. This question dealt with how:
Problem with sessions, subdomains and authlogic in Rails
精彩评论