4

There are two URLs where I want to run my Magento Store with same Magento Installation:
1. http://www.antistaticesd.com
2. http://www.antistaticesd.com/business

First of all, I created a directory name business under my root on my FTP server:

enter image description here

Then, I created another website in the Magento back end, another store and another store view. Therefore there are two each:

WEBSITE: main website (Code: base)  
MAIN WEBSITE STORE: (Root Category: Default Category)  
DEFAULT STORE VIEW: (Code: default)  

WEBSITE: Business Website (Code: business)  
MAIN WEBSITE STORE: (Root Category: Business Store)  
DEFAULT STORE VIEW: (Code: business_store_view)  

enter image description here

This is the code I added to the .htaccess file in "business directory":

SetEnvIf Host .*base.* MAGE_RUN_CODE="base";
SetEnvIf Host .*magento_site_2.* MAGE_RUN_TYPE="business";

The file other than .htaccess is the index.php that I copied from root folder(public_html) to "business" directory.

enter image description here

enter image description here

enter image description here

THE PROBLEM IS AS FOLLOWS:

enter image description here

enter image description here

1

1 Answer 1

1

Change your .htaccess to a pattern like this:

SetEnvIf Request_URI "^/business/.*" MAGE_RUN_CODE=business
SetEnvIf Request_URI "^/business/.*" MAGE_RUN_TYPE=website

No need to set a new Env vars for the default as it will default to it when the pattern is not matched

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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