Multilanguage site in virtual host mode with subdirs

Author Message

Andreas Tremel

Friday 27 October 2006 3:30:37 am

Hello There,

I searched through the whole forum, but I haven't found an answer for this.
This thread gave me a clue but ends unsolved, though: http://ez.no/community/forum/install_configuration/mixed_host_and_url_siteaccess_is_it_possible/re_mixed_host_and_url_siteaccess_is_it_possible

I've been setting up ezpublish (v. 3.8) in virtual host mode like this:
www.mysite.com
admin.mysite.com

The docs provide only a solution for multilanguage support via subdomains:
www.lang1.mysite.com
www.lang2.mysite.com

But instead, I want to access translated content via subdirectories:
www.mysite.com/lang1
www.mysite.com/lang2
(The layout should be the same on both sections.)

Is there an easy solution via httpd.conf in apache (internal redirect from a directory /lang1 to a subdomain) or can URI an Host site access be combined in some way to achive this?
Could anyone please provide me an answer how this can be done?

As we're all EZ beginners here, help would be appreciated.

Regards,

Andreas Tremel

Andreas Tremel

Friday 27 October 2006 7:53:13 am

Hi There,

aftr serveral [trial/error]-loops here the solution that works with our server;

- use Virtual Host Mode
- configure different sites as described in the docs, in our case:
lang1
lang2
- edit /.../settings/override/site.ini.append.php
the important section is:

[SiteAccessSettings]
ForceVirtualHost=true
MatchOrder=host;uri
HostMatchMapItems[]
HostMatchMapItems[]=lang1.mysite.com;lang1
HostMatchMapItems[]=lang2.mysite.com;lang2
HostMatchMapItems[]=admin.mysite.com;admin
URIMatchType=element
URIMatchElement=1 

You can then either access via
www.lang1.mysite.com
www.lang2.mysite.com

or alternatively via:
www.mysite.com/lang1
www.mysite.com/lang2

Regards,
Andreas Tremel

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 15:06:47
Script start
Timing: Jan 18 2025 15:06:47
Module start 'layout'
Timing: Jan 18 2025 15:06:47
Module start 'content'
Timing: Jan 18 2025 15:06:48
Module end 'content'
Timing: Jan 18 2025 15:06:48
Script end

Main resources:

Total runtime0.7939 sec
Peak memory usage4,096.0000 KB
Database Queries52

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0080 588.1641152.6563
Module start 'layout' 0.00800.0028 740.820339.5078
Module start 'content' 0.01070.7816 780.3281437.6250
Module end 'content' 0.79230.0016 1,217.95318.1094
Script end 0.7939  1,226.0625 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.4258160.0002
Check MTime0.00130.1657160.0001
Mysql Total
Database connection0.00060.069310.0006
Mysqli_queries0.746794.0551520.0144
Looping result0.00070.0842500.0000
Template Total0.760195.720.3800
Template load0.00210.269520.0011
Template processing0.757995.463120.3790
Template load and register function0.00020.019510.0002
states
state_id_array0.00080.094810.0008
state_identifier_array0.00180.228420.0009
Override
Cache load0.00180.2274390.0000
Sytem overhead
Fetch class attribute can translate value0.00060.077610.0006
Fetch class attribute name0.00140.172020.0007
XML
Image XML parsing0.00010.012910.0001
class_abstraction
Instantiating content class attribute0.00000.000920.0000
General
dbfile0.00060.0771100.0001
String conversion0.00000.001140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
11content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
9content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 25
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs