title: Magento -> Mage::run -> load storeview after redirect
body: <p><strong>I have two domains:</strong></p>
  
  <p>DomainA.nl (with magento installation)</p>
  
  <p>DomainB.nl (nothing installed; just a public_html folder with a .htaccess file)</p>
  
  <p><strong>DomainB.nl :</strong></p>
  
  <p>Content of the .htaccess file on DomainB.nl:</p>
  
  <pre><code>RewriteEngine on
  
  RewriteCond %{HTTP_HOST} !^www\.DomainA\.nl
  
  RewriteRule (.\*) http://www.DomainA.nl/$1 [R=301,L]
  </code></pre>
  
  <p>Above works; it succesfully redirects to DomainA</p>
  
  <p><strong>DomainA :</strong></p>
  
  <p>This is the domain with the Magento installation. With;</p>
  
  <ul>
  <li>1 website </li>
  <li><p>2 stores</p>
  
  <ul>
  <li>Store 1 has two storeviews
  
  <ul>
  <li>1: code = "mbv_nl" (DEFAULT STORE VIEW)  </li>
  <li>2: code = "mbv_en" </li>
  </ul></li>
  <li>Store 2 has one storeview
  
  <ul>
  <li>1: code = "test_nl"</li>
  </ul></li>
  </ul></li>
  </ul>
  
  <p><strong>Index.php on DomainA :</strong></p>
  
  <p>This is the content of the LAST lines of the index.php file on DomainA</p>
  
  <pre><code>     /* Store or website code */
       $mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : '';
  
       /* Run store or run website */
       $mageRunType = isset($_SERVER['MAGE_RUN_TYPE']) ? $_SERVER['MAGE_RUN_TYPE'] : 'store';
  
       switch ($_SERVER['HTTP_HOST']) {
           case 'DomainB.nl':
           case 'www.DomainB.nl':
               $mageRunCode = 'test_nl';
               $mageRunType = 'store';
               break;      
           default:
               $mageRunCode = '';
               $mageRunType = 'store';
               break;
       }
  
  
       Mage::run($mageRunCode, $mageRunType);
  </code></pre>
  
  <p>THE QUESTION:
  The redirect works BUT it redirects to the DEFAULT store view. </p>
  
  <p>In the 'switch-case' scenario i know the default case is not necessary because the $mageRunCode and $mageRunType are already declared. I put it in for testing. Because when i fill the default case with "mageRunCode = 'test_nl'" the storeview gets loaded.</p>
  
  <p>I am out of knowledge, so any help is VERY welcome :)</p>