eZ Platform Discussions

Redirect to specific siteaccess

version2

#1

currently I have two siteacess that offers the matching config,

siteaccess:
        match:
            Compound \ LogicalAnd:
                bel:
                    matchers:
                        Map\URI:
                            fr: true
                        Map\Host:
                            "%host%": true
                    match: bel
                lux:
                    matchers:
                        Map\URI:
                            fr: true
                        Map\Host:
                            "%host%": true
                    match: lux

For both siteacces we have a match on: mysite.org/fr
I should generate two urls in twig for each of the two siteaccess, so that when we click on the lux link:
I sould be redidirected to mysite.org/fr with lux siteaccess.

Unfortunately, with a {{url ('ez_urlalias', {'siteaccess': 'lux'})}} I’m redirected to mysite.org/fr
but siteacces but with ‘bel’ siteaccess.
Any idea how to force the siteacces to be setted to lux ?
Thank you


#2

What you’re describing here is not at all the siteaccess concept in eZPlatform.
So:
http://mysite.org/fr -> should match with “bel” siteaccess configuration and
http://mysite.org/lu -> should match with “lux” siteaccess configuration