• Hello guys,
    I am using new version of wordpress and just migrate from my html site,
    in the previous site i have my all site at the end of extension is .htm, here on WP i use a plugin to make .html extension on the end of every page but i want that all this.html extension will convert to .htm with .htaccess file
    so anyone can please tell me the code?
    thanks and regards

Viewing 2 replies - 1 through 2 (of 2 total)
  • So you are having a plugin convert the endings to .html and then you want .htaccess to convert to .htm? Why not edit the plugin to remove the “l” and avoid one conversion? That is going to be a more efficient solution.

    Howdy,
    You want blah.html to redirect to blah.htm?

    1. First, what is the plugin you’re using to make .html extension in WordPress? It might make sense just to make a change in settings / code of that plugin to do .htm instead of adding another layer of complexity by changing in .htaccess.

    Possibly, I don’t understand exactly where you’re coming from.

    2. Here’s the line you need to add to .htaccess, if (1) above isn’t an option:
    RewriteRule ^(.+)\.html$ $1.htm [L]

    I got that from:
    http://www.webhostingtalk.com/showthread.php?t=877618

    It should match anything .html and return anything.htm

    Regards,
    Paul

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘how to redirect .html to .htm?’ is closed to new replies.