Managing redirects

Ive updated an old site safely, by cloning it the a temporary sub-domain, then applying updates, in case it broke it. This has been successful and its now on version 9+.
Both old and new sites are on the same server, original on database 01, and new site (sub-domain) using database 02.
I have tried copying new site files over to public_html folder and removing all canonical redirects and cache files, but when I navigate to the original domain (not sub domain) it keeps redirecting to the sub-domain site.
If I try and force redirects using file in application/config/generated_overrides/concrete.php I just end up in a redirections loop which times out after 20 goes.

Am I missing something obvious please?

Do you have any references to your subdomain in the application/config/generated_overrides files?

Does your .htaccess file have any references to the subdomain?

Have you deleted all the files in application/files/cache after the copy?

Further to hutman’s suggestions, as a habit, I always put a blank .htaccess file in the new site and let the system build it when I enable ‘pretty urls’ and other stuff from the dashboard.

It was solved by my hosting support.
They suggested the problem was in the site.php file.
I added the correct domain in:
‘canonical_url’
‘canonical_url_alternative’

I also checked the correct domain was in concrete.php

I think my error was trying to edit the urls using the back end of C5 then moving the files. Instead I moved the files then manually edited the ones above and it worked. I also deleted all the cache files.

1 Like