eZ Community » Forums » eZ Publish 5 Platform » Multilingual multisites configuration...
expandshrink

Multilingual multisites configuration (default language on /).

Multilingual multisites configuration (default language on /).

Wednesday 29 July 2015 11:53:08 am - 3 replies

Hi,
I have a configuration problem with my eZ install.
My objective is to have default language on domain name root, and other(s) language(s) in a "/lang" :
1) Corporate site in main language english -> http://mycorpsite.com/
2) Corporate site in sub language french -> http://mycorpsite.com/fr
3) Subsidiary site in main language french -> http://myfrenchsite.fr/
4) Subsidiary site in sub language english -> http://myfrenchsite.fr/en
I've created a "multisite" configuration using 2 main nodes in the content tree (id 62 & 63).
Those two nodes are configured to be the root of 2 domain names : "mycorpsite.com" and "myfrenchsite.fr".
(I'm skipping that part, I managed to get this working happy.gif Emoticon )
The problem is : I'm not able to get the 2 domain names working in the same time without a suffix.

Here's an extract of my ezpublish.yml

     siteaccess:
        default_siteaccess: corporate
        list:
            - corporate
            - corporate_fr
            - france
            - france_en
            - admin_panel
        groups:
            admin_group:
                - admin_panel
            corporate_group:
                - corporate
                - corporate_fr
            france_group:
                - france
                - france_en
        match:
            Map\URI:
                admin_panel: admin_panel
            Compound\LogicalAnd:
                corporate:
                    matchers:
                        Map\URI:
                            "": true
                        Map\Host:
                            mycorpsite.com: true
                    match: corporate
                corporate_fr:
                    matchers:
                        Map\URI:
                            fr: true
                        Map\Host:
                            mycorpsite.com: true
                    match: corporate_fr
                france:
                    matchers:
                        Map\URI:
                            "": true
                        Map\Host:
                            myfrenchsite.fr: true
                    match: france
                france_en:
                    matchers:
                        Map\URI:
                            en: true
                        Map\Host:
                            myfrenchsite.fr: true
                    match: france_en

In this exemple, the default_siteaccess being corporate, the [Map\URI: "" : true] part will work for http://mycorpsite.com, but http://myfrenchsite.fr will display http://mycorpsite.com ...
I can display both sites well if I always define a suffix but my client really wants the default language to be on the root of each domain name and I don't know what to do...

Does somebody has the answer ?

Thursday 30 July 2015 1:10:37 am

Hi Trent,

have you tried removing the Map\URI: "": true part? And reorder so the more specific once are first to make sure match ordering works? I haven't 't tested it, but might help a bit.

Modified on Thursday 30 July 2015 1:15:00 am by André R

Sunday 23 August 2015 6:04:50 pm

Hi,

Thanks a lot you were right, the trick is to define, for each domain, the main siteaccess (without suffix) in last place, otherwise it does not work.

(in the previous example, if "france" is defined before "france_en", the "france" pattern will be not recognized and will be using "corporate", which is my default_siteaccess)

Modified on Sunday 23 August 2015 6:05:35 pm by Trent Trent

Monday 24 August 2015 4:00:06 pm

an other idea - why not combine   Map\Host and Map\URI.

For the default siteaccesses (without suffix) use Map\Host and and with suffix use Map\URI.

I think you only have to define the Map\Host before Map\Uri:

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from