title: Run Magento Store via .htaccess
body: <p>I have a fairly simple question which I thought would be easy to setup, but is proving difficult.</p>
  
  <p>I have a Magento installation, and I want it to have 2 websites, with two languages on each. Then wehen I go on the tennis UK domain it loads the UK store. If I go on the French domain it loads the French store.</p>
  
  <p><strong>This is how it is working now (INCORRECT):</strong></p>
  
  <pre><code>Tennis UK (website)
  Tennis UK (store &amp; store views)
  
  Tennis FR (website)
  Tennis FR (store &amp; store views)
  
  Volleyball UK (website)
  Volleyball UK (store &amp; store views)
  
  Volleyball FR (website)
  Volleyball FR (store &amp; store views)
  </code></pre>
  
  <p><strong>This is how I'd prefer it to work (CORRECT):</strong></p>
  
  <pre><code>Tennis (website)
  Tennis UK / Tennis FR (stores &amp; store views)
  
  Volleyball (website)
  Volleyball UK / Volleyball FR (stores &amp; store views)
  </code></pre>
  
  <p>In the htaccess I am running a script to run the correct website, but I thought that I should also be able to run a store code if needed, like this:</p>
  
  <pre><code>SetEnvIf Host www\.tennisukdomain\.co.uk MAGE_RUN_CODE=tennis_uk
  SetEnvIf Host www\.tennisukdomain\.co.uk MAGE_RUN_TYPE=store
  SetEnvIf Host ^tennisukdomain\.co.uk MAGE_RUN_CODE=tennis_uk
  SetEnvIf Host ^tennisukdomain\.co.uk MAGE_RUN_TYPE=store
  </code></pre>
  
  <p>But this is not working for some reason. Does anybody know the correct way to get this working. By loading a store view instead of a website each time it will cut down on the amount of configuration I have to do in the admin.</p>
  
  <p>Any help much appreciated.</p>