[pmwiki-users] Losing the www. in site URL
marc
gmane at auxbuss.com
Sun Dec 3 05:45:22 CST 2006
I have a site where I'm losing the initial www. on the URLs displayed in
the browser's URL input field. So, www.example.com/pmwiki/Main displays
as example.com/pmwiki/Main.
Thus I click a link to
http://www.example.com/pmwiki
and get
http://example.com/pmwiki/
This truncation is the same across the PmWiki part of the site.
I tend to use:
$ScriptUrl = 'http://'. $_SERVER['HTTP_HOST'] .'/pmwiki';
$PubDirUrl = 'http://'. $_SERVER['HTTP_HOST'] .'/pmwiki/pub';
in my local/config.php, so that I can use the same config/php locally
for testing as on the live site. Checking the site I can see that:
$_SERVER['HTTP_HOST']:www.example.com
Nevertheless, I changed the above to:
$ScriptUrl = 'http://www.example.com/pmwiki';
$PubDirUrl = 'http://www.example.com/pmwiki/pub';
What happened is that:
a link to
http://www.example.com/pmwiki
displays
http://example.com/pmwiki/
but the links are of the expected form:
http://www.example.com/pmwiki/Main/WikiSandbox
Does anyone know why the www. should be 'lost' initially?
And why changing from $_SERVER['HTTP_HOST'] causes a change of
behaviour?
Thanks.
--
Best,
Marc
More information about the pmwiki-users
mailing list