[pmwiki-users] Shared Pages in Farms

Sandy sandy at onebit.ca
Wed Feb 14 12:18:28 CST 2007


Patrick R. Michaud wrote:
> On Wed, Feb 14, 2007 at 12:06:05PM -0500, Sandy wrote:
>>
> 
> Oh.  The code I gave does an exact match for "sandy.onebit.ca"
> and "cricket.onebit.ca", but the url has "www.sandy.onebit.ca".
> 
> So, I guess we need to be a bit more liberal in checking for
> the host name:
> 
>   ## (:if sandy:) is true when hostname contains "sandy"
>   $Conditions['sandy'] = (strpos('sandy', $_SERVER['HTTP_HOST']) !== false);
> 
>   ## (:if cricket:) is true when hostname ends with "cricket.onebit.ca"
>   $Conditions['cricket'] = (strpos('cricket', $_SERVER['HTTP_HOST']) !== false);

Nope, still not working.
Would the position of these lines in farmconfig matter?
Do I need to enable any recipes?

> 
> Note that these are fairly liberal checks -- in particular,
> if you ever have a host named "www.yesandyes.onebit.ca" then
> (:if sandy:) would be treated as "true" because the hostname contains
> the sequence "sandy" in it.  But if we get to that point it's
> easy enough to write a more sophisticated test that would handle
> such cases.

Not a problem at the moment, but thanks for the heads-up.

Next idea?

Sandy




More information about the pmwiki-users mailing list