0
votes

I create more store views in my Magento 1.9 store, how I can add a subdomain per each store view.

For example I create a new store with the name eu where I setup the language to be english and I need to add a subdomain for this store view: eu.example.com but my url is something like this: http://example.com/?___store=de&___from_store=eu.

I made the steps like in this image, what I need to do to have this subdomain: eu.example.com to the eu store view?

enter image description here

Also I try to add something like this in .htaccess without success:

RewriteCond %{HTTP_HOST} ^eu.example.com
RewriteRule ^ - [E=MAGE_RUN_CODE:eu]
2

2 Answers

1
votes

You have to add this in your vhost file :

SetEnvIf Host ".*eu.*" MAGE_RUN_CODE=eu MAGE_RUN_TYPE=store
0
votes

No Need to change htaccess just need to manage the subdomain

Follow this steps:

  1. change the secure/unsecure url for associated store
  2. Configure Subdomain/If you are using Local Machine then assign virtual host with same directory
  3. Just run the site it's working well

enter image description here