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

XF 1.2 change Forum from "www." towards non "www."

erich37

Well-known member
#1
I have my Forum currently setup so that it always shows the "www." infront of the URL.

How do I change it to have it without the "www." as prefix ?


Do I need to remove this in the HT-Access-file ?
Do I also need to change anything in ACP in order to achieve this ?




Many thanks!
 

erich37

Well-known member
#3
When changing an existing Forum which has the "www."-Prefix, will my current members have any issues with loggin-in when I remove the "www." ?
 

erich37

Well-known member
#5
when you are using a website having the "www."-Prefix and save your Password with FireFox, then FireFox does not recognize your Password when visiting the website without the "www."-Prefix.
The strange thing is that FireFox or the cookies saving the Password in FireFox make a difference when you visit the very same website with www and without www.

:confused:
 

Jeremy

Well-known member
#6
Technically www. and wwwless domains are considered separate entities (the www is a subdomain), and unless the cookie tells the browser is available to sub-domains its considered separate.
 

erich37

Well-known member
#7
hmmm.....

so why isn't the cookie designed in a way that it will save the User-Password for both versions ?
So that the Password will be saved at all times, with "www" and without "www".
 

Jeremy

Well-known member
#8
By default its what you have defined (ie, its just xenforo.com and not .xenforo.com), but the functionality exists to make it available in both through a configuration option (config.php). Specifically, the cookie domain option. For it to work on test.xenforo.com and xenforo.com, it'd have to be .xenforo.com. See this for more information:
http://xenforo.com/help/config-php-options/
 

erich37

Well-known member
#9
So why is the cookie in "XF -default" not working for both Subdomain and Domain ?

I guess this would be a "Suggestion" then.....
 

Brogan

XenForo moderator
Staff member
#10
The functionality already exists as KK has said - just edit config.php for your specific requirements.

For example:
PHP:
$config['cookie'] = array (
    'prefix' => 'xf_',
    'path' => '/',
    'domain' => ''
);
 

Jeremy

Well-known member
#11
So why is the cookie in "XF -default" not working for both Subdomain and Domain ?

I guess this would be a "Suggestion" then.....
98% of sites don't need this. Which is why the functionality exists only as an advanced configuration option. Cookie domains are very sensitive and can easily be misconfigured.