1

I am using Magento multistore view for multiple languages like english, german, french etc.

To have clean urls i have enabled the settings "Add Store Code to Urls" to "yes".

Now it shows following url for stores:

English: mystore.com/english/category1.html

German: mystore.com/german/category1.html

English language store is my default store. it loads when my site load first. as it's default language i don't want to show english in the url.

So how can i remove the english from the default store view url?

The url for english should be:

English: http://mystore.com/category1.html

German: http://mystore.com/german/category1.html

Not sure how to do this.

2 Answers 2

1

Here is the solution

https://github.com/jreinke/magento-hide-default-store-code

Remove this format: ?___store=english for english and ?___store=arabic

In the design file find the languages.phtml

/app/design/frontend/default/template/page/switch/languages.phtml

In the line 41

echo $_lang->getCurrentUrl()

Add 'false' as parameter

echo $_lang->getCurrentUrl(false)

Actual Url:

http:example.com?___store=english for english and ?___store=arabic

After added the false parameter in $_lang->getCurrentUrl(false) method. Url will be generated like the below

http:example.com?___store=english

2
  • i already tried this extension. it shows 404 for my english store. Did reindex but still showing 404. also, already did false paramaters that's the reason getting clean url.
    – jack
    Apr 24, 2017 at 12:18
  • Did you Find Solution? Jan 27, 2021 at 10:55
0

This solution is work fine for me. I just add one line to model observer, and 404 is not showing.

$requestUri = str_replace('index.php/', '/', $requestUri);

Your Answer

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

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