.html Wordpress permalink on PAGES plugin

May 2, 2008 – 5:55 pm

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.

You will need permalinks activated obviously

NEW V1.1 .html on Pages

I have created a new version (v1.1) of this plugin, Just upload to your plugins folder, activate and away you go!
Improvements
No more mucking around editing / resaving pages.
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 2.7 beta 3

Works well for me on Wordpress 2.6.2, hope it works ok for you too.

Download the plugin and place in your wp-content/plugins directory
Activate on your plugins page in WP Admin
If you dont have any PAGES, just go ahead a create some.
If you have PAGES already you will need to either create a NEW page or edit/save an existing page to add the .html
If you de-activate the plugin you will need to do the same, edit/save a PAGE to remove the .html

  1. 23 Responses to “.html Wordpress permalink on PAGES plugin”

  2. Seems to work very well on my blog. thanks for sharing.

    By Grace on Jun 16, 2008

  3. Great Plugin! Works like a charm!

    Is there any way to tweak this plugin to exclude specified pages? …or the other way around, only work on one or two pages?

    By Andreas on Jun 24, 2008

  4. very cool. Thank you for providing this. Works great on my 2.5.1 install as well.
    –doug

    By munsinger on Jul 2, 2008

  5. Thanks, I was searching forever at the wordpress extend website. It worked like a charm!

    Thanks a lot

    By kingguffster on Jul 11, 2008

  6. It’s amazing how just a few lines of code can have such an impact. Thanks for putting this together! I’ve been scratching my head about what I was doing wrong, but now I know it’s just a WordPress “feature” :-)

    By Marios Alexandrou on Jul 22, 2008

  7. How can I modify the plugin to enable my pages to end in “.php” instead of “.html” ?

    I’m trying to migrate a site with .php page extensions into a cms wihtout having to do 301 redirects.

    thanks

    By Michael Erb on Jul 23, 2008

  8. thank you!

    does someone know how to make it wp 2.6 plugin ready so it shows up in plugin directory and we can activate and deactivate it?

    By jason on Jul 26, 2008

  9. oops! my error, it is wp 2.6 ready to activate / deactivate. cool. ok, but how do we get the static home page to have a static url permalink with .html?

    By jason on Jul 26, 2008

  10. Hi. I tried this plugin with WP 2.6.1 and created a page. I then tried to look at the page, and was greeted with this message:

    Forbidden

    You don’t have permission to access /wordpress/.html on this server.
    Apache/2.0.46 (CentOS) Server at billkath.co.nz Port 80

    What is wrong? Isn’t the plugin working for my site? I guess I’ll have to de-activate it.

    Cheers,
    Kath

    By Kath on Sep 8, 2008

  11. I have waited six days, and still my other comment has not been moderated. This forum does not seem to be active or functional.

    By Kath on Sep 14, 2008

  12. sorry this is not a forum, but i will try to help if i can.

    kath, do you have permalinks on??

    By admin on Sep 14, 2008

  13. how to remove the ending slash?

    from
    http://www. mysite.com/page.html/

    to
    http://www. mysite.com/page.html

    By robert on Oct 2, 2008

  14. Is there any chance you can write this plugin to work for category pages as well?

    Thanks!

    By Michael on Oct 19, 2008

  15. Thanks so much. I use Wordpress as a CMS for small sites so this worked perfectly!

    By kb on Oct 28, 2008

  16. Thank you.

    By Mizpah on Oct 31, 2008

  17. Hi, Please help me. I uploaded the file and added 2 posts and .html is not coming.

    Waiting for an early reply

    Thanks,
    Paul

    By paul on Oct 31, 2008

  18. The .html appears on pages not posts

    By admin on Oct 31, 2008

  19. Thanks, it works great!

    @ Paul - u can set .html for posts from wordpress -> settings -> permalinks , just type .html after %postname% like this:

    /%year%/%monthnum%/%day%/%postname%.html

    By Real HS on Nov 3, 2008

  20. This has become a standard plugin I use on all my installs.

    Thanks for sharing!

    DAN

    By Dan Poynor on Nov 5, 2008

  21. Works fine on 2.6.2 but not properly in 2.6.3. The line above the post/page editor where you type the page name does not appear at all.

    By Ian Forest on Nov 14, 2008

  22. Works fine for me on 2.6.3

    Thanks for sharing

    By dave on Nov 14, 2008

  23. Hi, I am using Wordpress 2.7 and it doesn’t appear to work in this version.

    Any ideas what to do?

    By Chris Flattley on Nov 18, 2008

  24. New version now available
    .html on Pages Plugin for Wordpress 2.7

    By admin on Nov 19, 2008

Post a Comment