Redirecting all pages with .html extensions

#32805
  • Resolved Michael Martin
    Rank Math free

    Please can you tell me if it is possible to redirect all pages with .html to non .html pages generated by WordPress?

    My site was initially built in Weebly which added .html to all pages, whereas WordPrss does not, so I would like to add a wildcard redirect for *.html or something similar. Can this be done via the RankMath redirect area of the plugin?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Todd
    Rank Math free

    Hi Michael,

    Thanks for getting in touch with us.

    Sure.

    First, you must make the change in WordPress Dashboard > Settings > Permalinks.

    Then, create a new redirect like this using Rank Math to redirect URLs like:
    domain.com/post-name.html
    to
    domain.com/post-name/

    null

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Not to worry, I got it to work with these settings (should anyone else need them):

    https://www.dropbox.com/s/6gjt30y40071x4l/regex-html-redirect.jpg?dl=0

    Todd
    Rank Math free

    Hi Michael,

    We are glad it is all sorted now.

    Please do not hesitate to let us know if you need our assistance with anything else.

Viewing 3 replies - 1 through 3 (of 3 total)

The ticket ‘Redirecting all pages with .html extensions’ is closed to new replies.