How I can remove store code from default store URL of my website?


www.domain.com/it/ **DEFAULT STORE**

www.domain.com/en/ **ENGLISH STORE**

I Need

www.domain.com/ **DEFAULT STORE**

www.domain.com/en/ **ENGLISH STORE**

Turn off store code urls in admin

admin > stores > configuration > General > Web > Add Store Code to Urls > No

run upgrade, static-content-deply and cache clean/flush commands

|improve this answer|||||

The it, en are the store view code, you can config them in admin->system->store manager->store view->code, now you can access to the store view either on enabling the code store view in the url in: admin->system->configuration->Web->Add store code to URLs->Yes, either to type this in the URL: www.domaine.com/?___store=en.

Now if want to remove the code from url, you have to set :Add store code to URLs->No, and you can always type it in the URL www.domaine.com/?___store=en.

|improve this answer|||||

If you have multiple store and want to remove ?___store=

Go to \app\code\core\Mage\Core\Model\Store.php line number 1153

// $storeParsedQuery['___from_store'] = $fromStore === true ? Mage::app()->getStore()->getCode() : $fromStore;

Just comment it..

Then it will show http://yoursite.com/en/ or http://yoursite.com/bd/ or your store code

|improve this answer|||||
  • also Add Store Code to Urls= YES from Magento configuration – Atish Dipankar Baidya Apr 1 '18 at 12:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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