title: htaccess redirect subdomain to domain magento store
body: <p><br>
  There is a shop on Magento - site.com.
  There's also a store views on subdomains, such sub1.site.com, sub2.site.com, sub3.site.com. Everything works fine but the theme set by bit does not work on subdomains. Theme uses    Mage :: getUrl () to generate the URLs for the AJAX Quick View and Add to Cart. It uses the store's base URL.<br>
  From the main site site.com everything works fine, preview AJAX works. On subdomains is not working because base URL to form subdomains sub1.site.com/catalog/ajax_product/view, but must be of the form site.com / catalog / ajax_product / view.
  Redirection in. Htaccess on a subdomain like:</p>
  
  <pre><code>RewriteEngine On
  RewriteCond %{REQUEST_URI} ^/(catalog/ajax_product/.*|checkout/cart/add/.*)$
  RewriteRule ^(.*)$ http://site.com/$1/ [R=301,L]
  </code></pre>
  
  <p>Does not work!</p>
  
  <p>Help!</p>