Forums / Setup & design / Mixing uri and host access types for multilingual sites

Mixing uri and host access types for multilingual sites

Author Message

Xavier Dutoit

Thursday 04 August 2005 8:17:44 am

Hi,

I'm having two unrelated sites

MatchOrder=host
HostMatchType=map
HostMatchMapItems[]=example.com;firstsite
HostMatchMapItems[]=another.com;secondsite

They are multi-lingual and I wanted to do that by uri :

MatchOrder=uri
URIMatchType=element
URIMatchElement=1
URIMatchRegexp=^/([^/]+)/
URIMatchRegexpItem=1
AvailableSiteAccessList[]=en
AvailableSiteAccessList[]=es

Is this a way to mix the host and uri access and achieve what I want :

example.com/en -> firstsite_en (a siteaccess)
example.com/es -> firstsite_es
another.com/en -> secondsite_en
another.com/es -> secondsite_es

Do you have a way to mix on a single install several sites having several languages ?

X+

http://www.sydesy.com

David Eriksson

Friday 05 August 2005 12:31:01 am

We have a couple of sites, all running on the same installation, one of which has what you want. I'd assume it'd be possible to make an English siteaccess to one of the other urls as well, but it's not something that we need. The guy here who did it is away for a week, but here's our override/site.ini:

AvailableSiteAccessList[]=site1
AvailableSiteAccessList[]=site1_en
AvailableSiteAccessList[]=site2
AvailableSiteAccessList[]=site3
AvailableSiteAccessList[]=site4
MatchOrder=host;uri
HostMatchMapItems[]=admin.site.se;admin
HostMatchMapItems[]=www.site2.se;site2
HostMatchMapItems[]=www.site3.se;site3
HostMatchMapItems[]=www.site4.se;site4

Bad thing about this is: site1 becomes www.site1.se/index.php/site1, just like the English becomes www.site1.se/index.php/site1_en. We'd prefer not having to use /site1 for the non-English site, but you can't get everything. :)

I would think the magic lies in this row:

MatchOrder=host;uri

Good luck!

/David