I have a Magento (220.127.116.11) site with multiple stores and a dev site as well on the same server. But when I login to admin panel in dev site its redirecting me to live sites's admin panel. I have done following to fix this but still no luck
1. checked local.xml in dev site if its correctly connected to dev database
2. checked base_url in core_config_data table in the dev database and replaced with dev site url
3. checked core_config_data table for domain name and they are NULL(in both live and dev db)
4. made var/cache, session and tmp folders empty in dev site
5. reindexed the dev site
Still its redirecting to the live site and in source html I see the various css and js files inside <head> tag are still with live url.
Can someone please help what else I can do to resolve this issue?
Solved! Go to Solution.
Can you execute this query on your database?
SELECT * FROM `core_config_data` WHERE `path` LIKE 'web/%/%url'
Are all the returned values right?
Maybe those css and js files are harcoded on your header phtmls or layout files?
Can you perform a search over your code looking for the LIVE url?
I have checked the core_config_data table as you mentioned and its returning result as expected with no live url.
Also I have checked the whole app/design folder and the live url is not hard coded on any file there.
So can you please suggest is there any other possibilities to cause this issue? One point, I noticed no log is being created under /var/cache or /var/session or /var/report or /var/tmp folder. The related folder permission are 775. I have checked changing it to 755 but still no change. May be this is anything related to the issue?
Are you sure your webserver is properly configured and can handle the dev domain request?
Maybe some DNS issue?
It seems isn't a Magento problem.
I have fixed the issue at last.
The issue was server cache. The site was using redis cache which was causing the cache files to be stored on a separate location not in /var/cache.
I have disabled the the redis cache and then applied 777 permission to /var directory. Then it started storing cache under /var/cache folder. Now I have removed everything from /var/cache and site started working correctly.