[dokuwiki] Re: Patch attached: Optionally add a filetype to wikipage urls, e.g. .html to look like static html

Hi Sander,

I see there is more to it, and you know much, much more about the topic. I did read through your links and I will archive your mail for taking care on matching occasions.

Sander Tekelenburg schrieb:
You are talking about a slightly different context though -- the situation
where URLs are not hyperlinks but just text, like links in (plain text) email.

So here's a thought: how about using content-negotiation for this?
If, when requesting <http://www.dokuwiki.org/syntax.html>, the server would
know to return the resource at <http://www.dokuwiki.org/syntax>, then one
could add a trailing ".html" to links in plain text contexts, thus providing
a hint that the URL points to a HTML document.

This way nothing would (need to) be changed about Dokuwiki's URLs. It would
merely allow someone to type an extra ".html" and, assuming the resource
actually is a Web page, still get the intended document. If at some point the

Thanks for your support, that's exactly how I implemented it!

author changes the resource to some other format, Dokuwiki should probably
return a 404. In that sense this does go against

Dokuwiki will just serve the document type which it wants to serve. I don't think this will change from (x)html in foreseeable years.
So I did not put checks for exceptions in here.

Note, that for the case that the reader explicitely wants a specific output format, DokuWiki already provides the "export" feature. E.g. <http://www.dokuwiki.org/_export/raw/syntax> or <http://www.dokuwiki.org/_export/xhtml/syntax> or without "nice url" e.g. <http://www.dokuwiki.org/doku.php?do=export_raw&id=syntax>
I think this is also different from your guidelines.

However I am not sure about

<http://www.w3.org/TR/chips/> and <http://www.w3.org/Provider/Style/URI>. But
only in the sense of what sort of requests it accepts -- not in the sense of
the URLs it actually generates itself. I'm inclined to consider this

I am not sure what you mean here. I implemented it that way, if the feature is enabled, the file extension hint is also put into generated links.

... if one mixes up
example.com/namespace/namespaceorfile with example.com/namespaceorfile/

I'm not sure which surprise you are referring to here.

Simply, if the trailing slash of an existing namespace is missing, DokuWiki does not redirecting to adding the slash or to the start page of the namespace, but creates a new page with an identical name as the namespace. Or is it the other way round: If a page of that name is not existing, the common practice of Browsers(?) to retrying with added slash is wrong?

I see that you are the originator of <http://webrepair.org/> "The Web Repair Initiative".

The only I have to say to my defense is, that humans don't always have an accurate view of the world, and I see the topic a little more pragmatic.

Now let's hear other voters, and leave it up to Andy as the project lead.

DokuWiki mailing list - more info at

Other related posts: