it’s curious that redirect_canonical doesn’t work in this case, but this will redirect everything with .html via .htaccess:
RewriteRule (.+)\.html?$ http://example.com/$1/ [R=301,L]
but keep in mind this will redirect everything with .html, you may need to explicitly exclude things.
Related Posts:
- add_rewrite_rule: $matches var not replaced by captured value
- Custom permalinks with NextGEN Gallery
- How to change default page slug?
- Will references to ugly links automatically redirect to their pretty url permalink?
- How do I add a add_rewrite_rule without it redirecting?
- WP Login forms action URLs displayed as pretty URLs in browser (ex with Restore Password)
- Sub domain redirection to taxonomy
- Redirecting all old links from previous EE site to new WP site in one go?
- Server (WordPress) redirects files that are not supposed to (using htaccess)
- Rewrite WordPress Custom URL
- WordPress removes spaces in URL on pagination
- Custom rewrite rule
- Home page with Polylang redirects to other page [closed]
- expecting 404 but redirecting to post with url subdirectory in post title
- Alias ‘wp-content’ directory to something shorter (framework?)
- Is there a ‘rake routes’ for wordpress?
- Remove Query String from URL on Redirect – Redirection Plugin
- add_rewrite_rule fro html to another url not working
- Double domain name in category URL-s
- WordPress redirects non-existing url to existing ones – how to disable
- Rewrite Preview URL to include index.php
- How to disable URL rewriting for specific URLs?
- Can I change default registration link (without htaccess)?
- How do I display only the parent page in the url
- How to remove wordpress directory slash
- Wildcard forward all posts and pages with few exceptions
- Redirect HTTP to HTTPS for all sub domains (blog posts)
- How to redirect large amount of URLs?
- Redirecting /px/?q=x to /px/x/
- URL redirect on updating the post date
- How to redirect a link to a new link?
- Rewrite vs Redirect from ?p={ID}
- Is WordPress API visible from PHP file called in htaccess
- Re-directing URLs with dates to URLs without dates
- Redirect htaccess [closed]
- How to redirect Webp files?
- 301 Rewriting htaccess
- 404 redirect based on url
- How are rewrite rules applied in WordPress?
- WordPress 3.1.2 Network Enabled non-www to www
- Redirect to new domain that serves new and different content
- Redirect users with “.” (dot) in their username and replace with “-” (dash) to correct profile
- Redirect empty search to another page
- Remove part from dynamic url and redirect
- Fresh install redirects to www, breaking page loads
- Broken page redirect
- Make URL like /fr/something display same as /something
- Remove trailing slash
- taxonomy term in URL slug won’t forward to the correct term for custom post like it does for default categories/normal posts
- Error 404 wordpress redirecting URL
- How to create short urls for sharing and downloadable content?
- Redirect A URL Pattern In WordPress Using .htaccess
- URLs ending with number higher than 2147483647 redirects to to domain.com/2147483647
- Migration from old CMS to WordPress 301 redirection rules?
- Changes done to .htaccess are not getting reverted back
- How to change search url produced by ‘s GET method?
- Using .htaccess to redirect /da/ to / in URL
- openlitespeed rewrite rules conversion from apache
- Allow requests to resources outside the wordpress folder
- Passing parameters to a custom page template using clean urls
- Making a plugin file accessible via url rewrite?
- Create built-in pages without creating actual pages
- Can ‘numberposts’ be passed in the URL query string?
- Mod_rewrite delete parameter in 301 Redirect
- add_rewrite_rule not working for page var
- Adding the amp url prefix to the beginning
- Use the plus sign “+” instead of dash “-” in URLs
- Add rewrite rule to call front-page.php?
- Add a query string to ALL links on site
- How make a multi language routes, with rewrite rules or rewrite endpoints?
- add_rewrite_rule() to route to file other than index.php
- Custom rewrite not working
- Trying to find the location of a rewrite of the URL query
- Why is WordPress rewriting absolute URLs on staging site to include staging prefix when we manually point them at the live site?
- How to create a URL Rewrite rule?
- Rewrite the default post object’s permalink
- WordPress search rewriting
- Enpoint Not Found in Rewrite Tag Permalink
- Capturing /page-name/[0-99999] in both template and number
- custom wordpress rewrite
- Keep requested/entered url with add_rewrite_rule
- Disable WordPress from changing URL slug when post is published
- Rewrite Rule for homepage not working correctly
- Adding Rewrite URL for Base + Children Separately
- Rewriting a date hierarchy into a ‘yyyy-mm-dd’ slug
- How to force load a page in plugin?
- URL rewrite( I think? )
- Help with WordPress custom url rewriting?
- loading images, css and fonts from site url
- How to Update / Change URL when Popup Modal Loads?
- How wordpress core include search.php with $_GET[‘s’]?
- Routing in WordPress
- Stop wordpress from prettify URL
- Rewrite URL query string for all pages
- how to change some of the rules in the database
- WordPress permalink still not working (error or not understood?)
- Custom Rewrite for Profiles
- Pagination posts. Url format
- how rewrite is working in wordpress
- How to prevent URL-modification when page title contains digits only?