[Pmwiki-users] Single wiki, multiple hostnames; restricting group access based on hostname

Patrick R. Michaud pmichaud
Fri Jan 23 09:01:42 CST 2004


Niall-

The solution you described below is exactly what I would've recommended. :-)

Pm


On Thu, Jan 22, 2004 at 08:19:15PM -0800, Niall Durham wrote:
> Hello,
> 
> On our shared hosting server we have it setup where a single PmWiki
> installation powers several different PmWiki groups tied to different
> hostnames.  E.g.,
> 
> http://www.going-coastal.com
> http://www.thunderdata1.com
> 
> There are several benefits to this setup.  However, one drawback is
> that one can access another group (another site, usually) from the
> "incorrect" host:
> 
> http://www.thunderdata1.com/wiki/GC/About
> 
> Since the graphics and stylesheet are stored under the
> going-coastal.com host, the page is not rendered properly (as you can
> plainly see).  Some of the web crawlers even index sites under the
> wrong hostname:
> 
> http://www.google.com/search?q=going-coastal+escalante
> 
> The best solution I have come up with (I'm planning on coding it up
> tomorrow/next week) is to make a script that contains a mapping of
> PmWiki groups to (correct) hostnames.  E.g. (pseudo markup),
> 
>     "GC" => "going-coastal.com",
>     "TDS" => "thunderdata1.com",
>     ...
> 
> This script will check the REQUEST_URI to make sure the group and
> hostname match.  If they don't, it will reformat the request with the
> proper hostname and return a 301 w/ the corrected URL.
> 
> We want something that's easy to maintain as we add more sites and
> allows pre-existing incorrect hostname URLs will still work.  With
> this approach, we only have to add one line to this "group ->
> hostname" script for each new site/group we add, and add an
> include_once() line to each customized group script.
> 
> So...  The reason I'm spamming everyone is to see if someone has
> already solved this problem and/or has a better solution/idea than
> I'm planning to implement.
> 
> Thanks for reading this far,
> 
> Niall
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free web site building tool. Try it!
> http://webhosting.yahoo.com/ps/sb/
> 
> -- 
> Pmwiki-users mailing list
> Pmwiki-users at pmichaud.com
> http://pmichaud.com/mailman/listinfo/pmwiki-users_pmichaud.com



More information about the pmwiki-users mailing list