eZ Community » Forums » General » Multiple Domains Host Match Map
expandshrink

Multiple Domains Host Match Map

Multiple Domains Host Match Map

Thursday 18 September 2014 9:11:10 pm - 1 reply

I am trying to figure out how (or the best way) to have multiple top level domains access the same installation of ezpublish with multiple siteaccess.

I currently have www.example.com and fr.example.com working. They both go to their appropriate siteaccess. I want to add www.example.fr to point to the fr siteaccess. 

Is this supposed to work?

HostMatchMapItems[]=fr.example.com;fr
HostMatchMapItems[]=www.example.fr;fr 

Or do I need to do some apache rewrites?

Thursday 18 September 2014 9:59:53 pm

Hello Travis,

No you should not need additional webserver rewrite rules to use multiple domains with multiple siteaccesses. Here is an example from a project I'm working. Note: These work already just fine. I'm sure you can do the same.

[SiteAccessSettings]
CheckValidity=false
AvailableSiteAccessList[]
AvailableSiteAccessList[]=site
AvailableSiteAccessList[]=eng
AvailableSiteAccessList[]=admin
AvailableSiteAccessList[]=statistics
MatchOrder=host
HostMatchMapItems[]
HostMatchMapItems[]=www.example.com;site
HostMatchMapItems[]=example.example.net;statistics
HostMatchMapItems[]=admin.example.com;admin
HostMatchMapItems[]=www.example212.com;site
HostMatchMapItems[]=admin.example212.com;admin
HostMatchMapItems[]=example.stage.example.net;site
HostMatchMapItems[]=admin.example.stage.example.net;admin
HostMatchMapItems[]=example.example.net;site
HostMatchMapItems[]=admin.example.example.net;admin
HostMatchMapItems[]=bc;site
HostMatchMapItems[]=admin.bc;admin
RemoveSiteAccessIfDefaultAccess=enabled

Test these out. I hope this helps ...

EDIT: Remember to configure your webserver to listen to requests and respond on the additional domain names. With apache / httpd this is configured by use of the ServerAlias directive in your virtual host configuration. This step is required!

Cheers,
Heath 

Modified on Friday 19 September 2014 3:15:02 am by // Heath

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from