[pmwiki-users] Generating incorrect URLs

Michael Brenner mik.admin at nurfuerspam.de
Sat Dec 2 05:13:43 CST 2006


Hi Rik,

PmWiki creates linkes based on the following variable[#1]. First step is 
lookup if the HTTP_HOST-variable is set bei the server [#3]. If that's the 
problem try to set it by hand in local/config.php [#2].

#1
 $ScriptUrl = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'];

#2 in local/config.php
...
$ScriptUrl = 'http://www.site.edu/'.$_SERVER['SCRIPT_NAME'];
$PubDirUrl = preg_replace('#/[^/]*$#','/pub',$ScriptUrl,1);
...

#3
http://de.php.net/manual/en/function.phpinfo.php
Am Samstag, 2. Dezember 2006 06:46 schrieb Rik Sarkar:
> Hi, I installed pmwiki on a server, the url for the script being :
> http://www.site.edu/~user/pmwiki/pmwiki.php
>
> When I go to this url, it shows the startup page, but all the urls in the
> page, insted of being complete, contain only a suffix of it, something
> like this :
>
> http://~user/pmwiki/pmwiki.php     or,
> http://~user/pmwiki/pmwiki.php?n=PmWiki.InitialSetupTasks
>
> I tried on internet explorer, where it gives something slightly stranger :
> http:///~user/pmwiki/pmwiki.php    or,
> http:///~rik/pmwiki/pmwiki.php?n=PmWiki.InitialSetupTasks
>
> That is, takes an extra slash after http.
>
> Please advise how to get around this. Can I set the site url somewhere so
> that all the relative urls are taken with respect to that ? Or some other
> hack ? (I do not have root, so can't do anything to the server iteself).
>
> Thanks,
>
> Rik.
>
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users




More information about the pmwiki-users mailing list