Migrated to new host but login redirects to old domain

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
prodigy6
New Member
New Member
Posts: 4
Joined: Thu Feb 17, 2011 11:01 am

Migrated to new host but login redirects to old domain

Post by prodigy6 »

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.
User avatar
M@rtijn
Power Poster
Power Poster
Posts: 706
Joined: Sat Nov 14, 2009 4:54 pm

Re: Migrated to new host but login redirects to old domain

Post by M@rtijn »

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!
prodigy6
New Member
New Member
Posts: 4
Joined: Thu Feb 17, 2011 11:01 am

Re: Migrated to new host but login redirects to old domain

Post by prodigy6 »

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.
prodigy6
New Member
New Member
Posts: 4
Joined: Thu Feb 17, 2011 11:01 am

Re: Migrated to new host but login redirects to old domain

Post by prodigy6 »

It`s almost like somewhere in the code for the login it asks the server for the domain and stops looking at config.php
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

Re: Migrated to new host but login redirects to old domain

Post by Wishbone »

Old domain? You changed hosts and your domain name?
prodigy6
New Member
New Member
Posts: 4
Joined: Thu Feb 17, 2011 11:01 am

Re: Migrated to new host but login redirects to old domain

Post by prodigy6 »

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.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Migrated to new host but login redirects to old domain

Post by Dr.CSS »

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...
baresi
Forum Members
Forum Members
Posts: 129
Joined: Fri Jul 27, 2007 4:15 pm

Re: Migrated to new host but login redirects to old domain

Post by baresi »

"base href" hard coded in your templates is one last resort kind of thing to look for
Locked

Return to “[locked] Installation, Setup and Upgrade”