eZ Platform Discussions

Force default site access on the URL?


#1

Hello!

Do someone know if there is an equivalent of Legacy functionality: RemoveSiteAccessIfDefaultAccess to force default site access on the URL.

Thanks.


#2

What’s the use case for this? With the siteaccess matchers, including the compound matcher with URI and host matching, we haven’t had the need for an equivalent setting.


#3

I have 3 siteaccess

  • /en/ (default)
  • /fr/
  • /es/

The root url is / (so English version)

I don’t what to have 2 url pointing to the same content to improve the SEO, so I want to force a redirect from / to /en

/my-page
/en/my-page

These 2 URI have the exactly same content.

With ezpublish legacy, a configuration was available:

RemoveSiteAccessIfDefaultSiteaccess=false


#4

Ah, OK, I was thinking /en to /, not / to /en.