define('BASE_URL', ''); define('DIR_REL', ''); MISSING

Permalink 2 users found helpful
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', '');
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..

View Replies: View Best Answer
ryan replied on at Permalink Best Answer Reply
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

thanks - thought I was being really dim lol.

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:

This isn't good for SEO reasons (duplicate content).

But if I add the two lines in site.php, everything works fine: is redirected to

So, wouldn't it be better to include these lines by default?
roketto replied on at Permalink Reply
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
I think I'll add them too for SEO reasons.
cainKuri replied on at Permalink Reply
so is it better always to use www instead a non www ?