As i’ve been working through a new site build that integrates a WordPress blog I’ve hit across an interesting problem.
Although through WordPress’ permalinks settings you are fully capable of giving a post a .html extension it seems impossible to do the same with pages. This seems a little odd, I tried a couple of things, such as changing the page permalink that it allows you to do, but when you add the .html WordPress removes the dot and leaves you with pagehtml rather than page.html.
Luckily if I enter .html into a browser it will redirect, however this leaves inconsistent url’s through the site. If the system can handle .html for a post, why not a page?

7 Comments
We have a similiar issue. We’re implementing WordPress on our website to handle our news section. We’re using .html extensions on all pages, which isn’t an issue as such since it’s easily changed with /%postname%.html in Permalinks. The problem is that Google likes consistency in URLs and we use .html on folders aswell.
For instance our (excisting) news section with teasers has this URL:
domain.com/news.html
A news article has this URL structure:
domain.com/news/post.html
So basically a folder doesn’t have the folder slash, but instead an .html extension a level down, which is removed when viewing an article in that folder/section (of course). Normally in these cases people would have used this type of URL for the folder/section:
domain.com/news
or
domain.com/news/ (adding another level with the slash)
Our problem is more specifically related to categories in WP. Say a category has the name “Real Estate”. The URL then becomes:
domain.com/category/real-estate
Leaving us with a page without the .html extension and consistency is all of the sudden flushed down the drain.
Any clues to a solution would be much appreciated.
Lasse
Lasse Heindorff | www.byggeklar.dk 25th June 2008 @ 6:31 pm
I do not believe this
fornetti 31st August 2008 @ 6:13 pm
There is a plugin that does this for “pages”.
Digital Nomad | www.digitalnomad.info 22nd August 2009 @ 5:47 pm
What an informative comment, Digital Nomad. Adding a link to the plugin or naming it might bring value to it, though. Just a suggestion.
Lasse Heindorff 22nd August 2009 @ 5:50 pm
There does seem to be a plugin available now at http://www.introsites.co.uk/33~html-wordpress-permalink-on-pages-plugin.html
So far I’ve tested on one site and it does appear to work, however the old url’s without .html will not redirect to the new pages with .html so creating htaccess redirects (or similar) would be needed to keep everything working smoothly
Kean 3rd September 2009 @ 10:05 am
not working with .html for this you should use static page plugin for wordpress very fast then any wp cache plugin
pallyweb | www.pallyweb.com 5th January 2010 @ 10:45 am
This Plug-in will do the job for pages. But unable to get a solution to put a extension on category urls.
Link to plugin home page:
http://wordpress.grandslambert.com/plugins/custom-page-extensions.html
John | www.cpupark.com 2nd April 2010 @ 11:00 am