[pmwiki-users] pagename and weird IE mime/type handling

Joachim Durchholz jo at durchholz.org
Tue Feb 28 08:51:53 CST 2006


Dominique Faure schrieb:
> Then, I was wondering if PmWiki could handle gracefully url ending
> with a fake file extension as in
> .../pmwiki.php/GroupName/PageName.txt?action=... which seems to be the
> only really working solution for me. If so, how may I generate such a
> link?

You need two things:

1) Make PmWiki generate the .txt suffix in the URL that it generates 
from the wikitext.
I'm not sure how to do that - I guess you don't want it for every wiki 
URL (else you'd end up seeing everything of your site as text/plain in 
IE), and I don't what kinds of links are source blocks and what aren't. 
In general, it's as simple as inserting the .txt suffix at the proper 
place in the format string.

2) Make the WWW server redirect the URL to the proper script with the 
proper parameters. That's the domain of mod_rewrite. Since you're 
already using it (you have CleanUrls, haven't you? *g*), you can simply 
duplicate the rule that handles the GroupName/PageName URLs, and modify 
it so that it handles a GroupName/PageName.txt URL.

That's just a very rough outline. Hope it helps.

Regards,
Jo




More information about the pmwiki-users mailing list