2

In magento1 you can set the base url's in a multistore like this: {{base_url}}en/, {{base_url}}nl/, etc.

Trying that in Magento 2 will result in the following Error:

Invalid Base URL. Value must be a URL or one of placeholders: {{base_url}}

Is there a workaround to achieve this without editing the database directly?

What I want to achieve is to work with multiple developers in one database.

1
  • If you don't want to edit the database directly, is having to extend the core's source code an option for you? – halfpastfour.am Mar 7 '17 at 18:26
9

I found the Solution. Just end your url with a /(Slash).

2
  • 1
    Like {{base_url}}/en/ ? – Frank Groot Jun 11 '19 at 9:18
  • Yes Frank you can try with above code.Do not forget to add / at end of url. – Anees Jun 11 '19 at 9:30
0

Okay, found a solution.

Just set every base url to {{base_url}}.

For example when you navigate to https://url.extension/store_url the base url is automatically set to that specific url.

So when you click on a link on that page the next page will be https://url.extension/store_url/next_page

In this way you can work with multiple developers in one database :)

0

I have faced same issue and fixed to add url with end / (Slash)

For Example you can use url https://www.example.com instead https://www.example.com/

Hope it help!

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.