MasaCMS/MasaTranslations

Removing default site id in url

Closed this issue · 1 comments

I have a multi-language site built with Mura that I want to upgrade to the Masa system. One of the issues that I have constantly been running into is the default site id in a URL string.

So on our live site, I have set the four languages of English - en, German - ge, Spanish - es, and Korean - ko. I placed the site bind order to have en first, and I didn't activate the default site in the Masa translation because the client didn't want the word "default" to show in the URL string; they preferred en or nothing after the domain. EN causes a redirect, but it was better than having the "default" show up in the URL string.

Is there a way to have the primary/default site id not show up in the URL string, but the other sites will?

For example:
https//www.mydomain.com - This is the primary/default English site
https://www.mydomain.com/de/ - German

I know that in the settings file, there is a siteidinurls=true/false. Could this be removed and set in the contentRender.cfc file with else if clauses or somewhere else?

Hi @Tigerlady,
What we do as a best practice is to not use the default site at all. That way it stays clear (since it's used as a template when creating a new site) and we have control over the siteid of the 'main' site. So I would suggest to copy your 'default' site over to a 'en' site.
The change you're suggesting regarding siteidinurls is a Masa CMS change, that can't be done as part of this plugin. But also, it won't be possible. This setting is used early on in the livescycle and required to be the same for the whole instance, so that the url parsing and generation can be consistent.