Forums / Setup & design / Switching from URI to host matching

Switching from URI to host matching

Author Message

Felix Laate

Thursday 10 February 2005 12:58:00 am

Hi all!

I have a site which use URI matching.

[SiteAccessSettings]
CheckValidity=false
AvailableSiteAccessList[]=site1
AvailableSiteAccessList[]=pub
MatchOrder=uri
HostMatchMapItems[]

Now I need to change to host.matching (I think), as I need people who type in site1.mydomain.com to get to a different siteaccess than thos who type in site2.mydomain.com. So I tried this:

[SiteAccessSettings]
AvailableSiteAccessList[]=nytt
AvailableSiteAccessList[]=pub
CheckValidity=false
MatchOrder=host
HostMatchType=map
HostMatchMapItems[]=site1.mydomain.com;site1
HostMatchMapItems[]=site1.mydomain.com;site2
HostMatchMapItems[]=pub.mydomain.com;pub

But doing this, I get "module not found"-errors. It seems that the system still uses site1/pub in the URL (e.g. http://site1.mydomain.com/site1/news). Taking that part out of the URL (e.g. http://site1.mydomain.com/news) solves the problem.

My question is then: how can I tell ez Publish to do host-matching, but to stop putting the siteaccess-name into the URL?

Felix

Publlic Relations Manager
Greater Stavanger
www.greaterstavanger.com

Jonathan Dillon-Hayes

Thursday 10 February 2005 1:52:51 am

[SiteAccessSettings]
AvailableSiteAccessList[]=nytt
AvailableSiteAccessList[]=pub
CheckValidity=false
ForceVirtualHost=true
MatchOrder=host
HostMatchType=map
HostMatchMapItems[]=nytt.com;nytt
HostMatchMapItems[]=pub.nytt.com;nytt_admin

As per the above example, Try adding a:
ForceVirtualHost=true

And make sure you're using fully qualified names. I've seen this done by ips, but it's not quite the right way.

Also, make sure that nothing duplicated, like you don't have two SiteAccessSettings or something similar. This has gotten me before.

Jonathan

---------
FireBright provides advanced eZ deployment with root access
http://www.FireBright.com/

Felix Laate

Thursday 10 February 2005 3:21:50 am

Hi there!

Thnak you for your advice!

>>ForceVirtualHost=true

Didn't do the trick..

>>And make sure you're using fully qualified names. I've seen this done by ips, but it's not quite the right way.

I'm not quite sure what you mean. "site1.mydomain.com" is an example of such one, isn't it?

>>Also, make sure that nothing duplicated, like you don't have two SiteAccessSettings or something similar. This has gotten me before.

Nope.. don't have.

Felix

Publlic Relations Manager
Greater Stavanger
www.greaterstavanger.com

nigel dodd

Thursday 23 June 2005 10:15:20 am

I have a similar problem. It is reported in the install and configuration forum:

http://ez.no/community/forum/install_configuration/menus_wrong_when_i_change_from_uri_to_host

Is there a solution?

Norman Leutner

Thursday 21 July 2005 2:53:29 am

I also changed with one site and had the same problem.

After you switched from uri to host mode
you have to clear all caches by deleting all contents within the var/siteaccess/cache dir.

That should fix your problem.

Mit freundlichen Grüßen
Best regards

Norman Leutner

____________________________________________________________
eZ Publish Platinum Partner - http://www.all2e.com
http://ez.no/partners/worldwide_partners/all2e_gmbh