I am trying to setup multi store in Magento, and here is what I have done so far (in the scenario I am trying to create another store for France and call it "FR"):

1) Creating a new root Catalog,

2) Creating a new Website/Store/StoreView in System >> Manage Stores

3) Creating a new directory called "fr" in magento root folder and I have copied "Index.php" and ".htaccess" file from magento root to "fr" folder.

4) I have edited the "index.php" file inside "fr" folder from

$mageFilename = MAGENTO_ROOT . '/app/Mage.php';


$mageFilename = '../app/Mage.php';

5) and I have added below code into the ".htaccess" of "fr" folder:

SetEnvIf Host .*base.* MAGE_RUN_CODE="base";

SetEnvIf Host .*magento_site_2.* MAGE_RUN_TYPE="fr";

I have also set the "Auto-redirect to Base URL" to disabled in the admin panel, and set the "secure" and "Not-secure" base url for "fr" store accordingly.

The Problem is, when I try to access the new store by going to www.example.com/fr/, I can see the exact same website with all the products and categories that are available in www.example.com. It does not feel like a new empty store.

4 Answers 4


Marius has explained this scenario perfectly here: Multi-website multi-store set-up

Just ensure that you have assigned your root (catalog) category correct in website configuration.

  • Problem solved by following the link you shared. I was missing some code replacement in the new "index.php" file. Thanks.
    – Benjamin
    Commented Jun 12, 2017 at 6:16

You can run multistore from same directory (for default website) without having to create a separate sub directory. So rest of the process is same but doesn't involve creating subdirectory for store "fr". Just go to System->Configuration->Web (from left menu) Url Option and select Yes under Add Shop Code to URLs Assuming your shop code is fr, you can now access your store via www.example.com/fr/

You don't need to add any code to htaccess file for this to work.

  • How about if I want to create a new website in Magento (not just store, and store view). Can I still ignore the part where I create the "fr" folder in the root folder of magento manually?
    – Benjamin
    Commented Jun 11, 2017 at 16:00
  • Yes, you can create a new website and assign it a new store view. Rest of the process stays the same.
    – Devtype
    Commented Jun 11, 2017 at 19:25

You also set the store base url for each store view.

Go to system->configuration->web. Select the fr store view from the top left selector and under the Unsecure url fill in this for the base url http://www.example.com/fr/.

Do the same for the Secure urls if you have them enabled (and use https).

  • Please check and let me know it is work Commented Jun 11, 2017 at 15:51

You just have to create your store and store view by setting "fr" in "code field", the root category of this store that you have created before etc... then the products of this root category will be visible just in this store.

Yo can access directly to your store via Url like this: http://www.domaine.com?___store=fr without enabling "Add Shop Code to URLs" field and creating a new root folder.

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.