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..

 
ryan replied on at Permalink Best Answer Reply
ryan
You don't need those any longer. I believe we stopped automatically creating those on install in version 5.4.1.
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.
glowmedia replied on at Permalink Reply
Ryan,

thanks - thought I was being really dim lol.

Steve
karlertl replied on at Permalink Reply
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:

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?
roketto replied on at Permalink Reply
roketto
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?
madesimplemedia replied on at Permalink Reply
madesimplemedia
I think I'll add them too for SEO reasons.
cainKuri replied on at Permalink Reply
cainKuri
so is it better always to use www instead a non www ?