define('BASE_URL', 'http://www.mysite.com'); define('DIR_REL', ''); MISSING
Permalink 2 users found helpful
Hi,
I have to move a site from a directory into the main root of the website - which is something I have done before, however when I check the config/site.php the lines:
define('BASE_URL', 'http://www.mysite.com');
define('DIR_REL', '');
are not there, the version I am running is 5.5.1?
Please help as the site needs to be moved this weekend..
I have to move a site from a directory into the main root of the website - which is something I have done before, however when I check the config/site.php the lines:
define('BASE_URL', 'http://www.mysite.com');
define('DIR_REL', '');
are not there, the version I am running is 5.5.1?
Please help as the site needs to be moved this weekend..
Ryan,
thanks - thought I was being really dim lol.
Steve
thanks - thought I was being really dim lol.
Steve
I just tried this with c5.5.2.1.
If I don't define BASE_URL and DIR_REL in the site.php, my site is accessible via 2 URLs:
This isn't good for SEO reasons (duplicate content).
But if I add the two lines in site.php, everything works fine:
http://mydomain.com is redirected tohttp://www.mydomain.com
So, wouldn't it be better to include these lines by default?
If I don't define BASE_URL and DIR_REL in the site.php, my site is accessible via 2 URLs:
http://mydomain.com http://www.mydomain.com
This isn't good for SEO reasons (duplicate content).
But if I add the two lines in site.php, everything works fine:
http://mydomain.com is redirected tohttp://www.mydomain.com
So, wouldn't it be better to include these lines by default?
I would also like to know this. I've added the lines back to site.php so that the non-www gets redirected, which seems to work fine. Just wondering if I should be doing this moving forward, or if I should utilize .htaccess instead?
I think I'll add them too for SEO reasons.
so is it better always to use www instead a non www ?
If they're there they will work as they always did, if they're not there your site will guess the values, makes it easier when moving sites.