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

Dominique Faure dominique.faure at gmail.com
Tue Feb 28 09:47:56 CST 2006


2006/2/28, Joachim Durchholz <jo at durchholz.org>:
> 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.
>

I tried several things including temporaly altering $ScriptUrl and
$EnablePathInfo in order to generate links like:
.../pmwiki.php/dummy.txt?n=Group.Name&...

but IE was keeping on interpreting html snippets as html code.

> 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.
>

Good idea, but my (general) background prerequisite is to try to not
depend on something else than php itself (therefore, no CleanUrls,
only $EnablePathInfo).

Regards,
Dom




More information about the pmwiki-users mailing list