Domain name change

Permalink
My normal workflow when developing websites is to do my development on my local linux box and then promote changes to the server. I usually refresh the data & files back to my localhost when testing. So I want to move site dev.localhost to xxxxx.com.

We are evaluating 8.1.0 for use for some of our simpler sites. It appears as though there's no easy way to change the domain name url. Older versions reference setting a base url in a sites.php file, which is not present in 8.x. I did change the canonical URL in the app.php file, which seems to have no effect. The cache is turned off.

I've also cleared the browser cache and used a browser which has never referenced the site, so it's not a browser cache issue.

No matter what i do, all URL's keep wanting to rerence my dev.localhost site instead of my xxxxxx.com production site.

Google and a search of these forums has failed to turn up an answer. What is the means of changing the domain name?

 
ConcreteOwl replied on at Permalink Reply
ConcreteOwl
If you have a htaccess file, make sure the RewriteBase is just a forward slash, like this
RewriteBase /
joleenshook replied on at Permalink Reply
There is no .htaccess file. Does there need to be one?
joleenshook replied on at Permalink Best Answer Reply
I've figured it out.

There is a sites.php file -- it's just down in the generated_overrides folder. Changed the canonical url in there and everything works as it should. So far, anyway.
neuroticimbecile replied on at Permalink Reply
Hi,

I ran into the same issue, running C5-8.2.1
May you please share the contents of your application/config/generated_overrides/site.php ?

Mine does not have the "canonical" stuff. It only contains this:

return [
    'sites' => [
        'default' => [
            'name' => 'The name of my site',
        ],
    ],
];


Thanks!
neuroticimbecile replied on at Permalink Reply
Nevermind. I found it.
It should contain this:

return [
    'sites' => [
        'default' => [
            'name' => 'The name of my site',
            'seo' => [
                'canonical_url' => 'http://thenewdomain.com',
                'canonical_url_alternative' => '',
            ],
        ],
    ],
];
serdarde replied on at Permalink Reply
Works! Thanks
jasteele12 replied on at Permalink Reply
jasteele12
I believe this should actually go in application/config/app.php:

<?php
return [
    'canonical-url' => 'http://thenewsite.com',
    'cononical-ssl-url' => 'https://thenewsite.com',
];

Somebody please correct me if this is wrong...