Recent Topics

1 Jan 01, 2009 11:07    

My b2evolution Version: 2.x

I am getting the following error message randomly when trying to login into b2evolution version 2.4.5:
WARNING: you are trying to log in to http://domain.com/blog/?blog=6 but your cookie domain is .domain.com. You will not be able to successfully log in to the requested domain until you fix your cookie domain in your %s configuration.

The login works fine even though the error message and the error doesn't appear every time when accessing the login page.

What could cause this?

EDIT:

I noticed that all other links in my blog have the domain in format "www.domain.com" but when clicking the login link, it has a parameter redirect_to=http://domain.com. Where does it get that parameter and can I correct it that it will point to www.domain.com?

2 Jan 02, 2009 06:29

Edit the $baseurl in conf/_basic_config.php
If it doesn't work then change the $instance_name in conf/_advanced.php, line 161

3 Jan 02, 2009 08:19

Both should be fine.

I think I have found the reason for the behaviour. When I type my blogs address in full (eg. with www. in front) it works correctly. But if I make a shortcut and leave the www. out, it will give the error message.

For example if I will come to http://www.domain.com by just typing "domain.com", it will give the error message because the redirect_url has the shortened domain address.

Shouldn't there be some kind of a workaround for this because I think other users can also make the same "mistake"?

4 Jan 03, 2009 11:16

You should be redirecting non-www to www to prevent duplicate content issues

htaccess :

RewriteEngine On

# redirect www to non-www

# check if url starts with www.
##RewriteCond %{HTTP_HOST} www\.(.*)

# strip the www. off and send browser on it's way to new url
##RewriteRule (.*) http://%1/$1 [R=301,L]




# redirect non-www to www

# check if url doesn't start with www.
RewriteCond %{HTTP_HOST} !^www\.

# add www. to the url and send the browser on it's way to new url
RewriteRule (.*) http://www.%{HTTP_HOST}/$1 [R=301,L]

¥


Form is loading...