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

XF 1.4 No www in url

Discussion in 'Troubleshooting and Problems' started by New Joe, Apr 28, 2015.

  1. New Joe

    New Joe Active Member

    Say I go to my site:

    mysite .com (no www)
    Then when I go to the above url I am not logged in as a member

    But say I go to my site:
    www. mysite .com (with www)
    Then I am logged in as a member

    How can I make it so that the non www url works the same as the www url

    Thanks
     
  2. The Forum Heroes

    The Forum Heroes Well-Known Member

    Yes, set a global cookie for your domain in your config.php file using *.domain.com
     
  3. New Joe

    New Joe Active Member

    So just add
    *.domain.com
    in my config.php file then?
     
  4. The Forum Heroes

    The Forum Heroes Well-Known Member


    No.. like this

    PHP:

    $config
    ['cookie'] = array(
       
    'prefix' => 'xf_',
       
    'path' => '/',
       
    'domain' => '.yourdomain.com'
    );

    Be sure to put the dot first, that will make it global.
     
    rafass, New Joe and Floyd R Turbo like this.
  5. Brogan

    Brogan XenForo Moderator Staff Member

    You need to force your site to one or the other domain.

    The FAQ in my signature explains how to do that.
     

Share This Page