Add .html extension on wordpress

Recently creating a WordPress site and i noticed a little problem, you can add .html in the settings which work fine for POSTS but not pages!

I wrote a small plugin that will add the .html to the end of PAGE urls, it will add the .html to the pages menu and add .html to the page slug when writing a new page.

Url Rewriting
You will need permalinks activated obviously

Download the plugin, upload to your plugins folder, activate and away you go!

Links return to normal when you deactivate.
Removes trailing slash ( .html/ ) if you use them in permalinks.
Works on subpages.
Tested WordPress 2.5.1 up to 3.0

Just tested and appears to still work fine on WordPress 3.0 :)

Does this help with SEO? No idea, but when converting an old static site to WordPress this allowed me to keep the original URLs (which ended in .html) active

Works well for me on WordPress 2.9, hope it works ok for you too.

TwitterFacebookBlogger PostDeliciousLinkedInDiggTechnorati FavoritesRedditMySpaceOrkutGoogle GmailShare

Tags: ,

Leave a Reply