Assuming you have already changed the permalinks structure as @RickHellewell suggests, then you can do something like the following near the top of your .htaccess
file (before the existing WP front-controller) to redirect the old URLs (with the stated format) in order to preserve SEO.
RewriteRule ^\d{4}/\d\d/([a-z-]+\.html)$ /$1 [R=301,L]
Related Posts:
- Place static HTML files in path below WordPress page
- htaccess rewrite for author query string when WP is in subfolder
- Rewrite rule not working
- .htaccess redirects disappeared after re-saving permalinks
- Protect Upload Folder Files With Ampersand Problem
- Remove File Extension for Page Outside of WordPress
- WordPress URL/Folder ReWrite using Htaccess
- WordPress mod_rewrite is canceling/overwriting my other mod_rewrite rule
- How can i redirect one url to another url using .htaccess or add_rewrite_rule
- Override htacces rule only for specific directory
- How to fix category url 404’s after category permalink change
- mod_rewrite loop, redirecting http to https on certain section of wordpress blog
- blocking access to all post/tag URIs via htaccess
- sitemap contains weird links and does not contain my pages [closed]
- Site in subfolder – all pages work except home
- htaccess, site and staging in subdirectories
- How to write .htaccess so that https is on for subpages only but not the home page
- How to create a redirect in the .htaccess file, with 2 exceptions
- 404 error Additionally 403 Forbidden error on a URL
- Custom rewrite rule, url returning 404
- How to remove the [L] Flag for WordPress index .php mod_rewrite
- mod_rewrite doesn’t work as I want even with JSON API Plugin disabled
- I have a page using a pretty url and a mod_rewrite rule matching it. I expected it to give an error but it’s working. Why?
- disable WordPress 404 for one specific page/folder to receive actual php errors
- .htaccess Non-‘www’ to ‘www’ Subdomain Redirection Only Works for Homepage
- How can I create a smarter .htaccess file that will add a directory?
- Rewriting subfolders to specific parent folder in WordPress
- Redirect WordPress site to a landing (construction) page using htaccess, with access to /wp-admin and /invoice
- htaccess redirect to path
- I can access subdirectory, but not files within it
- Redirect homepage /page/1/ to /blog/page/1/
- htaccess mod_rewrite not working
- Add-on domain works in WordPress but links still lead to subdomain
- Are there any negative impact if access to directories were accidently denied?
- How to remove .html from URL?
- How to remove .html from URL?
- How can I use an .htaccess file in Nginx?
- .htaccess – how to force “www.” in a generic way?
- htaccess – Redirect to subfolder without changing browser URL
- .htaccess Remove WWW from URL + Directories
- How does RewriteBase work in .htaccess
- Getting a 500 Internal Server Error on Laravel 5+ Ubuntu 14.04
- Generic htaccess redirect www to non-www
- Safely redirect old WordPress blog links to new WP blog
- Best collection of code for your .htaccess file [closed]
- Default .htaccess file for WordPress?
- Which one does WordPress prioritize when it comes to php.ini, wp-config and .htaccess?
- Masking wp-content/themes/name/images to just images directory using htaccess
- Improve wordpress security by hiding non public resources
- How to remove dates from existing permalinks?
- WordPress site hacked. Has .htaccess been hacked?
- Does this .htaccess security setting really work?
- htaccess problem after saving Settings
- Stop WordPress and Plugins from Overwriting .htaccess
- File and directory permissions
- htaccess disable WordPress rewrite rules for folder and its contents
- htaccess rewrite conflict with wordpress rules and ssl
- htaccess https redirect from www to non-www
- How do I turn off 301 redirecting posts (not canonical)?
- Htaccess for Wordpess set on single subdomain
- adding rewrite rules in .htaccess
- .htaccess and 500 error, extra character added
- Name-based virtual host configuration in Apache seems to cause a “500 Internal Server Error”
- WordPress on a subdirectory of Laravel – WordPress pretty permalinks inner page shows laravel
- Static raw HTML page
- WordPress + Magento .htaccess ReWriteRule Issue (www vs. non-www)
- Plugin to edit htaccess file
- Why “Settings->Permalinks” creates .htaccess file on nginx server?
- .htaccess for wordpress inside another wordpress install
- .htaccess file redirecting to parent directory
- How to map permalinks with accented letters to sanitized slugs?
- Blog.php or how to display recent posts?
- Rewrite /?rest_route=/ link to /wp-json/ without changing default permalink structure in apache
- Globally force SSL on all pages
- Serve apache 404 for missing assets rather then wp 404 template WP_Rewrites
- Isolating WordPress to a subfolder
- Bypass .htaccess when using download_url
- index.php not loading in main folder of wordpress
- Admin-Ajax.php, SSL, Non-SSL
- Removing rules from .htaccess
- How disable SSL redirect for specific URL?
- .htaccess rewrite rule for removing .php extension with exception of wp login and wp-admin
- WordPress site displaying 404 for any page apart from index
- Why does the header set X-Robots-Tag apply to all pages?
- Permalinks not working on second wordpress installed in a subdirect
- How to avoid wordpress permalink rules to inherit in a sub-folder
- Custom domain for sub-section of parent website
- Error:406 not acceptable
- Unable to access WP admin
- .htaccess Rewrite URL WordPress
- Move wordpress to folder without changing urls
- A plugin changes my .htaccess file and I can’t access httpd.conf as that’s a shared server
- Cant block wordpress readme files
- Change wp-content without changing the name of the folder
- 404/500 error on /wp-json
- WordPress keeps deleting .htaccess file
- Cache Busting using htaccess Rewrite rule?
- WordPress multisite causing Error 101 (net::ERR_CONNECTION_RESET): Unknown error [duplicate]
- Correct htaccess to display page while also passing in GET parameters
- What is the role of .htaccess file in WordPress?