1. 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

Discussion in 'Troubleshooting and Problems' started by snoopy5, Nov 15, 2012.

  1. snoopy5

    snoopy5 Well-Known Member


    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?
  2. Chris D

    Chris D XenForo Developer Staff Member

    Jake Bunce and CyclingTribe like this.
  3. snoopy5

    snoopy5 Well-Known Member

    Yes. if the link is without the www it forces to login again. Links with www are fine. Did I do something wrong in the settings? If yes, where?
  4. Chris D

    Chris D XenForo Developer Staff Member

    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.
    CyclingTribe, Jake Bunce and snoopy5 like this.
  5. snoopy5

    snoopy5 Well-Known Member

    Thanks. This was the solution!
    Chris D likes this.
  6. Mr. Goodie2Shoes

    Mr. Goodie2Shoes Well-Known Member

    You can also fix it by adding:
    $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' ;)
    Jake Bunce and CyclingTribe like this.

Share This Page