[pmwiki-users] host-independent URLs for configurations

Patrick R. Michaud pmichaud at pobox.com
Tue Mar 15 20:07:50 CST 2005


On Tue, Mar 15, 2005 at 07:17:13PM -0500, Bronwyn Boltwood wrote:
> On Tue, 15 Mar 2005 17:23:00 -0600, Patrick R. Michaud
> <pmichaud at pobox.com> wrote:
> > Well, in general you can get the base server URL by doing the
> > following:
> > 
> >    $BaseUrl = 'http://' . $_SERVER['HTTP_HOST'];
> > 
> > However, I'm guessing there must be some reason this doesn't work for
> > you.  In that case, the easiest thing to do is to create special .php
> > files that hold any machine-specific settings, and include them from
> > config.php.  For example, in your local/config.php you could put:
> 
> I didn't know about $BaseUrl, so I'll have to remember that one for
> later. Given that these machines have different directory structures,
> I should try the machine-specific configuration idea.

Just for clarity:  There's no $BaseUrl variable in PmWiki -- I was just 
giving an example of how you could get the server's url into a variable
of some sort.  This is the method that PmWiki currently uses to
determine the value of $ScriptUrl.

Pm



More information about the pmwiki-users mailing list