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

XF 1.5 User(s) keep getting logged out

Discussion in 'Troubleshooting and Problems' started by Shamatix, Dec 6, 2015.

  1. Shamatix

    Shamatix Member

    Hello fellow xenforo users / supporters,

    I have recently been setting up my site and linked it to a few friends of mine today, https://gurubashisurf.club/, what happends is he logs in and if he reloads the page he is logged out, if he presses any of the menus he is logged out again, so it like, logs him in and then out :S

    Hopefulyl someone has an answer? I cant tell if this happends for multiple users or just him as I only have 2-3 users at. He has tried both Firefox and Google chrome, happends both places, hope you have some suggestions.

    Best regards Shamatix
     
  2. Tracy Perry

    Tracy Perry Well-Known Member

    Prime issue will be you are serving both WWW and non-WWW on your site (available via either one). You need to decide on one or the other and then do a forced rewrite for all inbound on the one you don't want to go to the one you do.
     
  3. Shamatix

    Shamatix Member

    Can you give me an example of a WW and a non-WWW link on my site please :)?
     
  4. Tracy Perry

    Tracy Perry Well-Known Member

    Just go to your site as WWW.yourdomain.com and then yourdomain.com. They both take you to the same site.
    Then try www.thebent.bike and see what it does (I strip the WWW from my sites).
     
  5. Shamatix

    Shamatix Member

    Oh nice, by any chance you can help me on how this is achieved?
     
  6. Tracy Perry

    Tracy Perry Well-Known Member

    are you using Apache or nginx for your HTTP server?
    If using apache, then in the top of your .htaccess (below the rewrite base) you need to use
    Code:
    RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
    RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
    to strip the WWW to the non-www domain or
    Code:
    RewriteCond %{HTTP_HOST} !^www\. [NC]
    RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
    to redirect non-www to www.
    Nginx will be different.
     
  7. Shamatix

    Shamatix Member

    Pretty sure its apache but unsure, bought it hosted at ovh.ie ill check tommorow:) 5am here xD
     
  8. Tracy Perry

    Tracy Perry Well-Known Member

    If apache, see my updated post above. I think that placed in your htaccess should work (you just need to decide which format you want).
     
  9. Mike

    Mike XenForo Developer Staff Member

    It'd be important to note whether this is happening to you/multiple users or just him. If it's just him, that would imply something on his end.
     
  10. Shamatix

    Shamatix Member

    Thanks I got non-WWW now :) ill let you know when my friend is online
     

Share This Page