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.