• Resolved vickyh

    (@vickyh)


    I’d like to add .html to the end of my urls and in Permalinks I added this custom structure

    /%category%/%postname%.html

    However my menu links seem to be ignoring the .html part. Do I have to do something else to make this work?

    Thanks

Viewing 10 replies - 1 through 10 (of 10 total)
  • I’d try puting a backslash before the dot (\.html). Sometimes this works in .htaccess. Just a guess, but you can try 🙂

    You don’t need to escape (add a backslash before) the dot. The problem, I suspect, is that the items that aren’t being updated are pages, not posts. Page permalinks behave slightly differently and I suspect you’ll need a custom plugin to add .html to the end of a page.

    Thread Starter vickyh

    (@vickyh)

    Yes – I’ve just realised that the posts have .html added to them, but pages don’t.

    ftblguy

    (@ftblguy)

    Can we re-open this discussion? vickyh came to the conclusion that using the custom URL structure “/%category%/%postname%.html” applies to Posts, but not Pages.

    So my question is this: how do I get my Pages to end in .html? Help! Thanks!

    moshu

    (@moshu)

    You don’t. That’s how WP works. Sorry.

    ftblguy

    (@ftblguy)

    That’s too bad that there’s no flexibility for this. Thanks for the very quick response, moshu. Much appreciated!

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Edit the Pages in question. Change their slugs to have the .html in them.

    ftblguy

    (@ftblguy)

    Hi Otto42. I tried that. When you attempt to add .html to the slug, WordPress automatically removes the period. So the slug then reads “pagenamehtml” instead of “pagename.html”. I’ve tried to escape the period with a backslash (pagename\.html) to no avail. Same result. I’ve even tried a double dot (pagename..html) also to no avail. Same result. Always just comes back as “pagenamehtml”. But thank you for the suggestion.

    Try this:
    http://wordpress.org/support/topic/147118?replies=4#post-673065

    It works for me. Some say don’t work.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘adding .html to end of url’ is closed to new replies.