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 ?

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 02:54:21
Script start
Timing: Jan 18 2025 02:54:21
Module start 'layout'
Timing: Jan 18 2025 02:54:21
Module start 'content'
Timing: Jan 18 2025 02:54:21
Module end 'content'
Timing: Jan 18 2025 02:54:21
Script end

Main resources:

Total runtime0.0145 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 588.1563152.6563
Module start 'layout' 0.00520.0027 740.812539.5156
Module start 'content' 0.00780.0047 780.328190.1016
Module end 'content' 0.01250.0019 870.429734.2891
Script end 0.0144  904.7188 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002416.3265140.0002
Check MTime0.00117.2670140.0001
Mysql Total
Database connection0.00074.934710.0007
Mysqli_queries0.002214.930730.0007
Looping result0.00000.138310.0000
Template Total0.001711.410.0017
Template load0.00096.172410.0009
Template processing0.00085.198010.0008
Override
Cache load0.00064.266410.0006
General
dbfile0.00032.138180.0000
String conversion0.00000.095540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs