Magento – How to setup Subfolders for multiple Store Views

magento-2.1multistore

Before asking this question, I did Google search but could not find a clear answer.

I have:

  • 01 Website + 01 Store
  • 03 Store Views (vi, en, zh) sharing same products and categories

I want to setup:

  • mydomain.com/vi (for Vietnamese)
  • mydomain.com/en (for English)
  • mydomain.com/zh (for Chinese)

(All the URLs above include "http://", StackExchange wants me to remove it away from the post)

I did: go to Stores -> Configuration -> General -> Web -> choose Store View (vi, en, zh) -> edit Base URL for each Store View to be domain.com/vi (or zh, en) -> Save Config -> go to Cache Management -> select all rows and Refresh

THE RESULT: when going to the store home page (mydomain.com), the system redirects to the default Store View (which is mydomain.com/en), and then it shows 404 error.

What am I missing? Please give me a clear step-by-step answer. I'm using Apache with cPanel, PHP 7, Magento 2.1.2 Community Edition. I'm completely new to (2 days), I understand some basic fundamental ideas of Magento.

Your answers not only help me, but those newbies who would Google the same issue in the future.

Best Answer

On Magento 2.1.5 :

Stores > Configuration > Web > Url Options, with selected Store view : "Default Config"

switch option "Add Store Code to Urls" to "Yes" :

you don't need to change base urls

Related Topic