I followed this tutorial to set up a local staging version of our magento site. Locally it is running on an ubuntu & an apache server.
Everything seemed to work fine but when I point a browser at the staging site it redirects to the live site.
So far I've tried:
RewriteBase /localhost/
None of these worked, I've read that the app/etc/local.xml file may have some settings that could be causing this, but I can't find them.
Should I add some kind of rewrite to the .htaccess file ???
Any help would be appreciated.
This is my app/etc/local.xml file:
<?xml version="1.0"?>
<!--
/**
 * Magento
 *
 * NOTICE OF LICENSE
 * Blah Blah
-->
<config>
    <global>
        <install>
            <date><![CDATA[Mon, 07 Oct 2013 06:25:58 -0500]]></date>
        </install>
        <crypt>
            <key><![CDATA[de1v6an96abmo8kdhho2qbqrmcal3z0w]]></key>
        </crypt>
        <disable_local_modules>false</disable_local_modules>
        <resources>
            <db>
                <table_prefix><![CDATA[mg_]]></table_prefix>
            </db>
            <default_setup>
                <connection>
                    <host><![CDATA[localhost]]></host>
                    <username><![CDATA[??????]]></username>
                    <password><![CDATA[??????]]></password>
                    <dbname><![CDATA[??????]]></dbname>
                    <initStatements><![CDATA[SET NAMES utf8]]></initStatements>
                    <model><![CDATA[mysql4]]></model>
                    <type><![CDATA[pdo_mysql]]></type>
                    <pdoType><![CDATA[]]></pdoType>
                    <active>1</active>
                </connection>
            </default_setup>
        </resources>
        <session_save><![CDATA[db]]></session_save>
     </global>
     <admin>
        <routers>
            <adminhtml>
                <args>
                    <frontName><![CDATA[admin]]></frontName>
                </args>
            </adminhtml>
        </routers>
     </admin>
</config>
Solved!
The Redirect problem was due to Magento cache. I Simply deleted everything from the var/ folder of my Magento site. After that I cleared my browser's cache/cookies for good measure & it worked!
for me, the problem was :
still redirecting to live website.
The file permission of the magento folder were 775, I changed it to 777 and voila.
Note that this has the usual security issue and a chown www-data:www-data would be preferable. My dev server does not need to be too secured so the 0777 simplifies a bit.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With