title: local staging magento site redirecting to live site
body: <p>I followed <a href="http://davidtsadler.com/archives/2012/06/03/how-to-install-magento-on-ubuntu/" rel="noreferrer">this tutorial</a> to set up a local staging version of our magento site.  Locally it is running on an ubuntu &amp; an apache server.</p>
  
  <p>Everything seemed to work fine but when I point a browser at the staging site it redirects to the live site.</p>
  
  <p>So far I've tried:</p>
  
  <ol>
  <li>changing in the url entries in <strong>mg_core_config_data</strong> table in the local database</li>
  <li>clearing the browser cache &amp; cookies</li>
  <li>Changing the <strong>.htaccess file</strong> to include <code>RewriteBase /localhost/</code></li>
  </ol>
  
  <p>None of these worked, I've read that the <strong>app/etc/local.xml file</strong> may have some settings that could be causing this, but I can't find them.</p>
  
  <p>Should I add some kind of rewrite to the <strong>.htaccess file</strong> ???</p>
  
  <p>Any help would be appreciated.</p>
  
  <p>This is my <strong>app/etc/local.xml file:</strong> </p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;!--
  /**
   * Magento
   *
   * NOTICE OF LICENSE
   * Blah Blah
  --&gt;
  &lt;config&gt;
      &lt;global&gt;
          &lt;install&gt;
              &lt;date&gt;&lt;![CDATA[Mon, 07 Oct 2013 06:25:58 -0500]]&gt;&lt;/date&gt;
          &lt;/install&gt;
          &lt;crypt&gt;
              &lt;key&gt;&lt;![CDATA[de1v6an96abmo8kdhho2qbqrmcal3z0w]]&gt;&lt;/key&gt;
          &lt;/crypt&gt;
          &lt;disable_local_modules&gt;false&lt;/disable_local_modules&gt;
          &lt;resources&gt;
              &lt;db&gt;
                  &lt;table_prefix&gt;&lt;![CDATA[mg_]]&gt;&lt;/table_prefix&gt;
              &lt;/db&gt;
              &lt;default_setup&gt;
                  &lt;connection&gt;
                      &lt;host&gt;&lt;![CDATA[localhost]]&gt;&lt;/host&gt;
                      &lt;username&gt;&lt;![CDATA[??????]]&gt;&lt;/username&gt;
                      &lt;password&gt;&lt;![CDATA[??????]]&gt;&lt;/password&gt;
                      &lt;dbname&gt;&lt;![CDATA[??????]]&gt;&lt;/dbname&gt;
                      &lt;initStatements&gt;&lt;![CDATA[SET NAMES utf8]]&gt;&lt;/initStatements&gt;
                      &lt;model&gt;&lt;![CDATA[mysql4]]&gt;&lt;/model&gt;
                      &lt;type&gt;&lt;![CDATA[pdo_mysql]]&gt;&lt;/type&gt;
                      &lt;pdoType&gt;&lt;![CDATA[]]&gt;&lt;/pdoType&gt;
                      &lt;active&gt;1&lt;/active&gt;
                  &lt;/connection&gt;
              &lt;/default_setup&gt;
          &lt;/resources&gt;
          &lt;session_save&gt;&lt;![CDATA[db]]&gt;&lt;/session_save&gt;
       &lt;/global&gt;
       &lt;admin&gt;
          &lt;routers&gt;
              &lt;adminhtml&gt;
                  &lt;args&gt;
                      &lt;frontName&gt;&lt;![CDATA[admin]]&gt;&lt;/frontName&gt;
                  &lt;/args&gt;
              &lt;/adminhtml&gt;
          &lt;/routers&gt;
       &lt;/admin&gt;
  &lt;/config&gt;
  </code></pre>