• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.1 clicking on internal links forces to login again

snoopy5

Well-known member
#1
Hi

when users are clicking on internal links (links that guides them from one posting within XF to another posting within XF), the brwoser always opens a new window to display it and ask them always to login, although they have been already logged in and checked that they want to stay logged in. Same for my accounts.

How can I fix it, so that they do not need always to login again?
 

Chris D

XenForo developer
Staff member
#4
No, you've not done anything wrong as such, but there is a solution.

Effectively your site is available at two URLs. One with www and one without.

The solution is to redirect every single user to only one URL, no matter what URL they use.

Here's a solution from Jake: http://xenforo.com/community/threads/redirecting-non-www-to-www.35242/#post-400091

After that is implemented, anyone going to the non www site, will be automatically redirected to the www site. This might mean for some users they get logged out once. But once they are logged in it shouldn't happen again.
 

snoopy5

Well-known member
#5
No, you've not done anything wrong as such, but there is a solution.

Effectively your site is available at two URLs. One with www and one without.

The solution is to redirect every single user to only one URL, no matter what URL they use.

Here's a solution from Jake: http://xenforo.com/community/threads/redirecting-non-www-to-www.35242/#post-400091

After that is implemented, anyone going to the non www site, will be automatically redirected to the www site. This might mean for some users they get logged out once. But once they are logged in it shouldn't happen again.

Thanks. This was the solution!
 

Mr. Goodie2Shoes

Well-known member
#6
You can also fix it by adding:
PHP:
$config['cookie']['domain'] = '.mywebsite.com' //changing mywebsite.com to your site's domain without www
to your config.php file

but it's better to redirect www to sans-www or vice versa to prevent 'duplicate content' ;)