Skip to content

Instantly share code, notes, and snippets.

@simofacc
Created January 31, 2016 08:48
Show Gist options
  • Save simofacc/c3e30c40899d1f1ed470 to your computer and use it in GitHub Desktop.
Save simofacc/c3e30c40899d1f1ed470 to your computer and use it in GitHub Desktop.
Setting environment variables in Magento using .htaccess
############################################
## If developing on localhost, uncomment this to enable developer mode
SetEnvIf REMOTE_ADDR ^127.0.0.1 MAGE_IS_DEVELOPER_MODE
# Default store
SetEnvIf HOST ^store1.yourdomain.com.au$ MAGE_RUN_CODE=default
SetEnvIf HOST ^store1.yourdomain.com.au$ MAGE_RUN_TYPE=store
# Store two variables
SetEnvIf HOST ^store2.yourdomain.com.au$ MAGE_RUN_CODE=store_two
SetEnvIf HOST ^store2.yourdomain.com.au$ MAGE_RUN_TYPE=website
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment