[pmwiki-users] relative links

Patrick R. Michaud pmichaud at pobox.com
Wed Apr 13 15:29:14 CDT 2005

On Wed, Apr 13, 2005 at 06:35:03PM +0100, pmwiki at flisch.net wrote:
> I would like to make links external to the wiki, but relative in terms 
> of the web server.  In other words to another part of my website, 
> without having to specify an absolute URL.  Is this possible?

I'm assuming you mean from the wiki markup.  One mechanism is to
create a custom InterMap entry for your server.  For example,
if you create an entry in local/localmap.txt that reads

   rel      $1

then you can use "rel:/path/to/file.txt"  to refer to /path/to/file.txt
on the current server.  Of course you can name "rel" whatever you wish.

There is a currently a proposal outstanding to have any link target
beginning with '/' be treated as a relative url; if this is implemented
one could do [[/path/to/file.txt]] to generate the same thing.  But
so far it hasn't gotten a lot of discussion or support.


More information about the pmwiki-users mailing list