We have developing a e-commerce website in magento. We have two type of products.

  1. Electrical
  2. Apparels

We need to set-up two sub-domain for same Magento installation.What are the steps for achieving this?

I need urls looks like this.

  1. electrical.example.com
  2. apparels.example.com

you can refer official magento documentation to manage your domain

Your htaccess code should be like this

SetEnvIf Host www\.electrical.example\.com MAGE_RUN_CODE=elecw
SetEnvIf Host www\.electrical.example\.com MAGE_RUN_TYPE=website
SetEnvIf Host ^electrical.example\.com MAGE_RUN_CODE=elecw
SetEnvIf Host ^electrical.example\.com MAGE_RUN_TYPE=website

SetEnvIf Host www\.apparels.example\.de MAGE_RUN_CODE=appaw
SetEnvIf Host www\.apparels.example\.de MAGE_RUN_TYPE=website
SetEnvIf Host ^apparels.example\.de MAGE_RUN_CODE=appaw
SetEnvIf Host ^apparels.example\.de MAGE_RUN_TYPE=website   

you can set your store code as per your convenience.

Hope this will sure help you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.