How to set a Store View via .htaccess Magento


You can set the Store View code adding the following line to your .htaccess

In this example my Store View code is "french":

Hint: you can see your Store Views codes through your Admin > System > Manage Stores

How does it work?

In your index.php file in your root directory you will find the following lines (probably at the end of the file).

As you can see it uses the $_SERVER['MAGE_RUN_CODE'] if it has been set.

About Rick

Senior Front-end Software Engineer from Barcelona, Haidong Gumdo Instructor (korean martial art of the sword), street photographer, travel lover, TV addict, Boston Red Sox fan, and privacy advocate.

Leave a Reply

Add <code> Some Code </code> by using this tags.