[pmwiki-users] Putting ".html" extensions onto pages

Joachim Durchholz jo at durchholz.org
Wed Mar 1 10:54:08 CST 2006


Susan schrieb:
> I can still see a problem, depending on how uploaded files work. Is 
> there a chance that the extension will be the only difference between an 
> uploaded file and a wiki page?

Uploaded files have urls like
   http://asdf.jkl.io/awhtwre/pub/uploads/my-upload.png

They are served directly by the server, with no intervention by PmWiki, 
so whatever directory the server has established for the directory, it 
will apply. (The uploads directory being what it is, it should *not* 
have content negotiation - people may upload foo.html and foo.htm, and 
might be surprised to get foo.html if they requested foo.htm.)

> I often have the same thing in .doc, .html and .rtf formats. I don't 
> recall having .shtml and .html that wasn't a mistake, but it's still a 
> possibility.
> 
> Aha! (We'll see. Track record is rather poor this morning.)
> 
> - If the requested page, with requested extension, exists, then use it.
> 
> - Otherwise, make the best guess for the wiki page (which is likely to 
> be dropping the suffix).

It's considerably more variant. Here's a run-down off the top of my head:

Case 1: No PathInfo. Wikipage URLs have the form 
.../pmwiki.php?n=Group.Page. Everything that has the same prefix but 
doesn't start with pmwiki.php is a non-PmWiki URL that's served without 
PmWiki intervention.
Case 2: With PathInfo, but no CleanUrls recipe. Wikipage URLs have the 
form .../pmwiki.php/Group/Page. Everything that has the same prefix but 
doesn't start with pmwiki.php is a non-PmWiki URL that's served without 
PmWiki intervention.
Case 3: With PathInfo and a CleanUrls recipe. Wikipage URLs start with a 
lowercase letter (in the a-z range). All other URLs are non-PmWiki URLs 
that are served without PmWiki intervention.
Case 4: Everything is served through pmwiki.php. (There was a discussion 
on that; I don't know whether this ever materialized as a recipe. It's 
certainly something to consider for the "ignore extensions" change - we 
don't want extensions ignored when serving files!)

Regards,
Jo




More information about the pmwiki-users mailing list