3

we are setting up a multistore. Now we see "__store and ___from_store" in the UR. Is there an easy (and accepted method) of utilizing the functionality, but hiding the url string "__store and ___from_store"

So moving from domain1.com => domain2.com does not result in

http://domain2.com/?___store=domain1&___from_store=domain1

but rather

http://domain2.com/

thanks!

  • See System > Config > Web > Add Store Code – mbalparda Jan 26 '15 at 17:07
  • Setting is set to NO. Are you suggesting to switch this to YES? – snh_nl Jan 26 '15 at 18:30
  • @snh_nl I am asking some info apart from your post, i am created multi-store, using blog.chapagain.com.np/magento-setup-multiple-website. I am using the same theme for both stores, how can i change header and footer for my second store, pls keep in mind same theme. What is the use of symlinks? – zus Dec 25 '17 at 12:07
4

One possible solution is to change the your page/switch/languages.phtml file

Find the line that reads

echo $_lang->getCurrentUrl()

And replace with

echo $_lang->getCurrentUrl(false)

Option 2

Go to System -> Configuration -> Web -> URL Options and set the 'Add Shop Code to URLs' option to Yes

This will make the urls to the store appear like the following:

www.myshop.com/otherstore/

www.myshop.com/default/

To edit the names of your stores to be SEO friendly, go to System -> Manage Shops

3

Thanks to @mbalparda and this article

Actually setting the option "System > Config > Web > Add Store Code" to YES: removes __store from the url because Magento now uses /storecode/ to identify which store needs to be opened.

Open question: is how does this work with storeviews that are on different domains? Here I don't think you would want this setting set to YES ...

3

Magento Enterprise does this with a redirect as soon as the __store parameter is recognized and the store cookie has been set. With an observer on controller_front_init_before you should be able to rebuild this feature for CE.

  • Do you mean controller_front_init_before? – Simon Aug 30 '16 at 9:47
  • @Simon: yes. I shouldn't try to write event names without looking them up :) – Fabian Schmengler Aug 30 '16 at 9:49
  • 1
    +1 :D Can you at least tell where EE implements that? – Simon Aug 30 '16 at 9:51

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.