Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 1 of 2
Magento redirect to old url after clear the cache. 
 
SarathTomy
Sr. Member
 
Avatar
Total Posts:  146
Joined:  2009-03-13
Melbourne, Australia
 

Magento redirect to old url after clearing the cache, add/edit/store, System>Configuration>Web . Then click save.Then also It redirects to old url. I checked the database, clear the var/ cache etc.. Now also.. Please help..

 
Magento Community Magento Community
Magento Community
Magento Community
 
Riftlord
Member
 
Total Posts:  36
Joined:  2010-03-08
 

Find a global search and replace script to replace all occurances of the old url with the new. Also delete everything in /var/session. Good Luck

 
Magento Community Magento Community
Magento Community
Magento Community
 
boziboy
Member
 
Total Posts:  44
Joined:  2009-11-05
 

Hello,
I don\’t mean to hijack your thread, but I believe I have a similar problem. I have my store installed on a subdomain (shop.mydomain.com), and I have wordpress on the main domain (mydomain.com). I changed my BASEURL settings from HTTP to HTTPS in configuration to test something, and all of a sudden wordpress loads under the subdomain and it gives me the 404 error (when you try and go to a page that does not exist).

I immediately tried to revert back to HTTP but since my admin was not accessible I had to change the settings under CORE_CONFIG_DATA in the database, which i\’ve done before with no problem. Now, even after changing the baseurl and secureurl my store still will not load. Even when I type HTTP://shop.mydomain.com the browser will redirect to HTTPS://shop.mydomain.com but still loads my wordpress site. This is all very strange and has never happened to me before.

I have:
- not done any recent upgrades
- running magento 1.3.2.1
- done this 50 times so I don\’t understand why it\’s happening now.

Thank you in advance for any insight you can provide.

~jason

 
Magento Community Magento Community
Magento Community
Magento Community
 
SarathTomy
Sr. Member
 
Avatar
Total Posts:  146
Joined:  2009-03-13
Melbourne, Australia
 

@Riftlord

I cleared the full cahce files and search full in database . But cannot find the old url. Can you tell me any chances to occur this issue ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
000018
Jr. Member
 
Total Posts:  2
Joined:  2011-01-04
 

I have same issue.

modified mysql, cleared var/cache and var/session, but the site still redirects to old url.

Does anyone know how to fix this? thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
joberg
Jr. Member
 
Total Posts:  18
Joined:  2010-04-07
 

Same here, local server redirects to live server, even if I change the database in local.xml to a non existing DB

 
Magento Community Magento Community
Magento Community
Magento Community
 
pwinkelm
Jr. Member
 
Total Posts:  6
Joined:  2010-10-06
 

Same problem over here (and it is getting very annoying) and I really do not understand this.

I am helping out a customer on a Magento 1.5.0.1 installation. Magento was installed initialy in <>/webshop/magento subdirectory (and that directory still exisist)

I reinstalled Magento 1.5.01. into the root of the domain using another database. After that I exported the original database and imported into the new one. Changed (un)secure urls in database, removed var/cache and var/session directories. I checked all files for webshop/magento and changed them.

Starting the new <domain>/index.php brings me to the old url. (I also see a frontend cookie pointing to the old url)
Starting <domain>/index.php again (so there are some caching files now) brings me to the correct url.

Logging in with admin account and clear cahce from admin panel brings me to the old url again.

How is this possible? Please help me out on this one, as told. It is getting very annoying! Do I need to delete the webshop/magento directories and files?

Thanks a lot in advance.

 
Magento Community Magento Community
Magento Community
Magento Community
 
pwinkelm
Jr. Member
 
Total Posts:  6
Joined:  2010-10-06
 

Hello,

after deleting the /webshop/magento directorystructure I still had the same behaviour.

In my app/etc-directory there was a copy of the origal local.xml (called localORIGINAL.xml). After removing this xml ALL WENT FINE.

I do not know how Magento retrieves the configuration, but in one or another way it looks like Magento scans for localXXXX.xml files and parses them all when there is no caching?

Anyway, deleting that localORIGINAL.xml file solved my problem. Hopefully I can help others with this.

Thanks and regards,
Pieter

 
Magento Community Magento Community
Magento Community
Magento Community
 
synapsetest1
Jr. Member
 
Total Posts:  1
Joined:  2010-04-21
 

Thanks pwinkelm for the post. It was really helpful for us as we were struggling to address the issue since last week.

Thanks again and keep up the good work smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
pwinkelm
Jr. Member
 
Total Posts:  6
Joined:  2010-10-06
 

In /app/code/core/Mage/Core/Model/Config.pgp Magento the loadBae function causes the problem.

This line of code:

$files glob($etcDir.DS.'*.xml');

/**
     * Load base system configuration (config.xml and local.xml files)
     *
     * @return Mage_Core_Model_Config
     */
    public function loadBase()
    
{
        $etcDir 
$this->getOptions()->getEtcDir();
        
$files glob($etcDir.DS.'*.xml');
        
$this->loadFile(current($files));
        while (
$file next($files)) {
            $merge 
= clone $this->_prototype;
            
$merge->loadFile($file);
            
$this->extend($merge);
        
}
        
if (in_array($etcDir.DS.'local.xml'$files)) {
            $this
->_isLocalConfigLoaded true;
        
}
        
return $this;
    
}
 
Magento Community Magento Community
Magento Community
Magento Community
 
sanjaypatel653
Jr. Member
 
Avatar
Total Posts:  9
Joined:  2010-01-29
Ahmedabad
 

Really Helpful....

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
tvshow
Jr. Member
 
Total Posts:  9
Joined:  2010-06-07
 

@pwinkelm Thank You for figuring this out!!

It was right under my nose. I had two Magento developers try to figure it out, and then I spent a good 20hours, 5 complete transfers, new server, new domain, 6 database imports, and on, and on.... Every time I had to change that damn local.xml to connect to the new database.

To re-iterate for others out there with re-direct issues after moving to a new domain / test server, MAKE SURE YOU ONLY HAVE ONE LOCAL.XML IN app/etc/* !!!! No other file can have “local” in it’s name in that directory.

I’m sure this will/may have been fixed, so for the record, I’m running 1.4.1.1.

Good Luck!

 
Magento Community Magento Community
Magento Community
Magento Community
 
indikatiron
Jr. Member
 
Total Posts:  9
Joined:  2010-09-28
 

Hi
Change file permission of “var” directory to 777

 
Magento Community Magento Community
Magento Community
Magento Community
 
Nor_MAN
Jr. Member
 
Total Posts:  14
Joined:  2012-08-07
 

You could try this service http://www.shopping-cart-diagnostics.com/, they can locate whta the problem is. I’m not sure it’ll help in your case, but for me it went well.... Give it a try at least.

 
Magento Community Magento Community
Magento Community
Magento Community
 
jonwhite1
Jr. Member
 
Total Posts:  1
Joined:  2012-08-09
 
pwinkelm - 22 June 2011 04:22 AM

In /app/code/core/Mage/Core/Model/Config.pgp Magento the loadBae function causes the problem.

This line of code:

$files glob($etcDir.DS.'*.xml');

/**
     * Load base system configuration (config.xml and local.xml files)
     *
     * @return Mage_Core_Model_Config
     */
    public function loadBase()
    
{
        $etcDir 
$this->getOptions()->getEtcDir();
        
$files glob($etcDir.DS.'*.xml');
        
$this->loadFile(current($files));
        while (
$file next($files)) {
            $merge 
= clone $this->_prototype;
            
$merge->loadFile($file);
            
$this->extend($merge);
        
}
        
if (in_array($etcDir.DS.'local.xml'$files)) {
            $this
->_isLocalConfigLoaded true;
        
}
        
return $this;
    
}

That looks good

_____________________________________________________________________________________________________
tooth implant | tooth implants | teeth implants

 
Magento Community Magento Community
Magento Community
Magento Community
 
Mohxin
Jr. Member
 
Avatar
Total Posts:  24
Joined:  2012-08-26
 
pwinkelm - 20 June 2011 11:42 PM

Hello,

after deleting the /webshop/magento directorystructure I still had the same behaviour.

In my app/etc-directory there was a copy of the origal local.xml (called localORIGINAL.xml). After removing this xml ALL WENT FINE.

I do not know how Magento retrieves the configuration, but in one or another way it looks like Magento scans for localXXXX.xml files and parses them all when there is no caching?

Anyway, deleting that localORIGINAL.xml file solved my problem. Hopefully I can help others with this.

Thanks and regards,
Pieter

@ Pieter

Bro your post did the trick. Thanks a lot

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 2