OK folks, I've followed the instructions to move to our new host, so have the pages and db migrated. The sql works, if I put in incorrect details it stays on the login page and come back with an error. However if I put in valid user credential I get redirected to the login page on my old host/domain.
I have updated config.php so that $config['root_url'] = '<new domain here>';
My new domain name does include a $ as it is a test preview before I migrate the DNS, but I didnt think this would effect it as it is between the '
Any ideas would be much appreciated thanks.
Migrated to new host but login redirects to old domain
Re: Migrated to new host but login redirects to old domain
Did you also change the other references in config.php?
Code: Select all
$config['root_url']
$config['root_path'] <- !!
$config['previews_path']
$config['uploads_path']
$config['image_uploads_path']
Make your community a better place!
Re: Migrated to new host but login redirects to old domain
Yes, I have updated the paths. It`s odd that if login fails it comes back to testdomain/login.php but if it succeeds it goes to olddomain/login.php
Like I said, I followed the guide, how to move toa enw host, updated config.php as intructed and migrated my database. Also set file eprmisssions as instructed for relevent folders.
It`s like the code asks the server to tell it it`s domain and ignores config.php after the login.
Like I said, I followed the guide, how to move toa enw host, updated config.php as intructed and migrated my database. Also set file eprmisssions as instructed for relevent folders.
It`s like the code asks the server to tell it it`s domain and ignores config.php after the login.
Re: Migrated to new host but login redirects to old domain
It`s almost like somewhere in the code for the login it asks the server for the domain and stops looking at config.php
Re: Migrated to new host but login redirects to old domain
Old domain? You changed hosts and your domain name?
Re: Migrated to new host but login redirects to old domain
No, I changed hosts and while testing there was a new test domain name, turns out this works now I`ve migrated the domain. So somewhere in the code it references the "domain as the server sees it" and ignores config.php
All working fine now, just difficult for testing on my test URL.
All working fine now, just difficult for testing on my test URL.
Re: Migrated to new host but login redirects to old domain
You could have put the install folder back in run install but on STEP 5 DON'T CREATE TABLES OR INSTALL DEFAULT CONTENT, this would have straightened out any path problems...
Re: Migrated to new host but login redirects to old domain
"base href" hard coded in your templates is one last resort kind of thing to look for