Hi
I have a Magento (1.9.1.1) 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?
Regards
iwdnil
Solved! Go to Solution.
Hi,
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.
Regards
iwdnil
Hi @iwdnil,
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?
Hi Damian,
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?
Regards
iwdnil
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.
Hi,
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.
Regards
iwdnil
Hi,
Just wanted if you could shed a little more details on this, I am having same issue, I have purged varnish and flush redis but staging site still redirects to live site.
If I understand you correctly you stop the Redis right?
Then you change folder permission of /var folder on Dev site? Mine was already 777 permission.
Then you restarted Redis?
then remove everything in /var/cache right?
Thank you in advance!
Sincerely,
Jayson
Is it the /var directory of the dev site or the live site or both? I am having somewhat related issue that my dev site is redirecting to live site.
Thank you!