Magento 1.7 Multistore – How to Hide the Default Store View Code from the URL

magento-1.7multistoreurl

The site has 2 languages: English and French, represented by 2 store views. French is the default one. For our SEO efforts we need to have the following urls:

French - http://www.domain.com/category/product
English - http://www.domain.com/en/category/product

System -> Configuration -> Web -> Add Store Codes to URL is the all or nothing setting. i turn it off for the default store only. I’ve done a lot of searching through the forums and wiki but there’s nothing on the subject.

Please any sugestions?

Best Answer

By chance I worked on this same problem recently and created this store codes extension. It works by inserting itself into the router chain, something most module devs aren't even aware of. Instructions are given on the github page.

Caveat Emptor: I've only used this on one site so far and it's not yet released on Magento Connect because it lacks testing.

Related Topic