Forums / Developer / Differences between host;uri and host_uri in MatchOrder ?

Differences between host;uri and host_uri in MatchOrder ?

Author Message

Jerome Despatis

Friday 01 July 2011 1:54:07 am

For now, I have a multilingual website, I wanted uri like domain.com/fr, domain.com/zh etc..

So I've used MatchOrder=host;uri, And i've renamed the default siteaccesses (coded on three characters by default), for example 'fre' to 'fr' and so on for all siteaccesses

Now, until eZ 4.5 (or 4.4, I can't remember), the MatchOrder=host_uri has appeared...

Anyone could explain me the difference between the both ? the advantages of host_uri in regards of host;uri in fact

Thanks

Jérôme Vieilledent

Friday 01 July 2011 5:30:38 am

Hi Jerome

The difference is in the way eZ Publish tries to figure out which siteaccess to use to handle the request.

  • host;uri will try first the host mode, and then the URI mode if the host mode failed
  • host_uri will take the 2 as a whole (host + URI at the same time)

Jerome Despatis

Friday 01 July 2011 7:30:06 am

Ok thanks I understand.

But it leads me to another question: I'd like to have the FrontEnd and the BackEnd multilingual for example, to fully understand

Here I definitely need host_uri I guess

So i do something like, for example:

MatchOrder=host_uri
HostUriMatchMapItems[]=adminezpublish11.poseidon.dev;;ezwebin_site_clean_admin
HostUriMatchMapItems[]=adminezpublish11.poseidon.dev;es;ezwebin_site_clean_admin
HostUriMatchMapItems[]=wwwezpublish11.poseidon.dev;en;en;end
HostUriMatchMapItems[]=wwwezpublish11.poseidon.dev;es;es;end

I go to http://adminezpublish11.poseidon.dev/es

I was thinking page would be exactly the same as http://adminezpublish11.poseidon.dev as same siteaccess is used

But I get indeed 'es' is an undefined module (kernel 20 error)

The logic is however good for FE

Any idea ?