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
- How to create custom URL routes?
- Two (or more) parallel (sub-)TLDs that are retained when surfing the site / dynamically set the site address?
- How-to add rewrite rules to point the uploads folder to a subdomain
- URL rewrite based on a custom field value
- Author url rewrite
- Search url wp-rewrite after redirect?
- Having trouble with using add_rewrite_rule and pagination
- Issue with using .htaccess to redirect feedburner feed
- How to create an endpoint without creating sub endpoints?
- WordPress Page Id
- How to rewrite taxonomy and tags URL
- Changing WordPress Address URL disaster
- Prevent WordPress from Rewriting URL for one template
- Disable Pagination on Pages
- Need help with simple rewrite rule (shouldn’t this be easy?)
- How to add a custom redirect rule for Post as subdomains?
- Get url param no longer works when using add_rewrite_rule
- How to use add_rewrite_rule in subdomain
- adding custom controller called by front-end
- rewrite attachment url with attachment title
- How to change custom post type slug
- rewrite rule generated with mpdf to a shorter version
- database not responding on localhost
- Trying to add array of paths to post permalink
- How to rewrite URL back to default custom URL if no destination found
- Creating a custom rewrite for a single page
- How to add logged in username after WordPress URL?
- Dynamic URL with rewrite rule not working
- How to get relative page for every post: /post-1/contact. /post-2/contact
- History API & URL for single long page
- Is it possible to rewrite a page URL from ID to name from an API?
- Root-relative paths being rewritten on ‘Edit Page’ [closed]
- Rewrite Rule added but showing 404 rather than specified page
- Any way to make Apache’s internal redirect work?
- Url wordpress rewrite
- Get parameters and custom page template
- Direct Dynamic URL in root to a location within template
- WordPress Landing Page Redirection Issue
- WordPress Custom Rewrite Rule
- How to make custom WordPress page deliver search results
- URI rewriting: handling one page
- Post pages are redirecting to the 404 page in wordpress
- Problems Implementing Non-WordPress Rewrite Rules