Magento – Magento Migration Redirects to the old Server

magento-1.7redirect

I moved my magento installation to a new server. I copied all the files,folders and mysql dump to the new server. I configured local.xml to set the new database settings. When i tried the ipaddress in the browser it took me to the default apache page with magento favicon. So I gave to 777 permissions to all the files and folder (I know its wrong). Now When i try the IPaddress in the brower it redirects me to the old magento server link.Why is this happening?

Thanks

Best Answer

I forgot to update the base url.

UPDATE core_config_data SET value="http://newhost.com/" WHERE path="web/unsecure/base_url";
UPDATE core_config_data SET value="https://newhost.com/" WHERE path="web/secure/base_u

replace "newhost.com" with your domain name.

And added in the httpd.conf file

Options Indexes FollowSymLinks

AllowOverride all

inside the directive that says

'<Directory "YOUR DOCUMENT ROOT HERE">'

You can find the httpd.conf file in /etc/httpd/conf/httpd.conf or /etc/apache2/httpd.conf for linux distros.

Related Topic