Questions answered by this recipe
- Can PmWiki urls end with .html?
Many PmWiki sites are configured so that urls are shorter and look like they go directly to individual pages (e.g., CleanUrls). Adding the following settings to local/config.php causes PmWiki to add a .html extension to the end of page urls.
$ScriptUrl/[^?#\'"\\s<>/]+/[^?#\'"\\s<>]+!'] = '$0.html';
$FmtPV['$PageUrl'] = 'PUE("
So what should I do? Designing URIs / What to leave out
- File name extension. This is a very common one. "cgi", even ".html" is something which will change. You may not be using HTML for that page in 20 years time, but you might want today's links to it to still be valid. The canonical way of making links to the W3C site doesn't use the extension.
Still, if you (or your client) really wants to see that ".html" at the end of the urls, then the above recipe lets you do it. All it does is add ".html" to any page urls that PmWiki encounters during page and template processing.
The above recipe has been enabled on this page, and you can see that all of the links to other pages have the ".html" extension added to them.
See Discussion at HtmlUrls-Talk