cancel
Showing results for 
Search instead for 
Did you mean: 

SetEnvIf Host is not working for subdomain but working for main domain

SetEnvIf Host is not working for subdomain but working for main domain

In my magento .htaccess file SetEnvIf Host is not working for subdomain, But it is working for domain

WORKING

SetEnvIf Host www\.domain\.com MAGE_RUN_CODE=domain_com 
SetEnvIf Host www\.domain\.com MAGE_RUN_TYPE=website
SetEnvIf Host ^domain\.com MAGE_RUN_CODE=domain_com
SetEnvIf Host ^domain\.com MAGE_RUN_TYPE=website

NOT WORKING

SetEnvIf Host www\.sub\.domain\.com MAGE_RUN_CODE=domain_com 
SetEnvIf Host www\.sub\.domain\.com MAGE_RUN_TYPE=website
SetEnvIf Host ^sub\.domain\.com MAGE_RUN_CODE=domain_com
SetEnvIf Host ^sub\.domain\.com MAGE_RUN_TYPE=website

Why is it so??? Is there any problem in my code? mod_env is enabled

My magento version is 1.9. Can any one please help me?

1 REPLY 1

Re: SetEnvIf Host is not working for subdomain but working for main domain

Hi Abdulhakkim,

 

Were you able to figure this out ?

 

I too am facing a similar issue on Magento 1.9.2.4 CE

 

My query is listed here :

https://community.magento.com/t5/Admin-Configuration-Questions/Multiple-stores-on-single-domain-on-M...