[pmwiki-users] how does one encode "file:" link in a wiki page?

Patrick R. Michaud pmichaud at pobox.com
Mon Jan 24 17:18:26 CST 2005


On Mon, Jan 24, 2005 at 05:36:50PM -0500, Gautam H. Thaker wrote:
> My usage is exactly as you are envisioning - in side a corp. network. 

There are a couple of other PmWiki users that are also in corp. networks
where file: made good sense.  In one case they actually created
InterMap entries that were shortcuts for the drive letters, thus
an author could write

    Q:somefile.doc

in the markup and PmWiki would make it a link to file:///Q:/somefile.doc
in the output.  Unfortunately, this is only likely to work in a
homogeneous browser environment, because each browser has its own
idea of the "file:" syntax...

> I hope this makes sense. I think mozilla ignores it prob. due to 
> restrictions placed on it by apache to ignore files outside of root may be 
> (/var/www/html, for example.) So i think that can be overcome with config 
> files for apache.

Actually, no.  With file:... URLs a browser accesses the file directly
through the local filesystem and does not talk to any web server such
as Apache.  Access to the files is the same as whatever access the 
browser user would have to them through any other local application.

The problem is strictly one of syntax and the differences in the way
browsers interpret the leading slashes in file:-urls.  However, we
might be able to solve the problem using a "dynamic InterMap link" --
i.e., we could create an InterMap link in config.php that would
correctly translate to the correct file:/// syntax depending on the
type of browser being used to load the wiki page.  If you can get
me examples of file:- urls that work (and don't work) in each
browser, I'll prototype some code for you to do this.

Pm



More information about the pmwiki-users mailing list