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
- Getting a 500 Internal Server Error on Laravel 5+ Ubuntu 14.04
- htaccess problem after saving Settings
- File and directory permissions
- htaccess https redirect from www to non-www
- Name-based virtual host configuration in Apache seems to cause a “500 Internal Server Error”
- Isolating WordPress to a subfolder
- How disable SSL redirect for specific URL?
- Why does the header set X-Robots-Tag apply to all pages?
- Error:406 not acceptable
- .htaccess Rewrite URL WordPress
- A plugin changes my .htaccess file and I can’t access httpd.conf as that’s a shared server
- Cache Busting using htaccess Rewrite rule?
- How can I code my plugin to safely modify .htaccess?
- HTAccess stops me from accessing WordPress Dashboard links
- .htaccess redirects no longer work
- .htaccess rewrite rule puzzle
- Allow logged in users who doesn’t belong to whitelisted ips
- Best way to redirect site in subdirectory to root?
- Missing slash after moving site to subfolder
- WildCard SSL with wordpress subdomain
- browser caching not disabled after disabling in .htaccess
- Transfer to HTTPS – mixed content on main page only [closed]
- Htaccess redirect after changing Language URL format
- .htaccess rule to redirect old URLs to new structure [closed]
- How do I test to ensure that my wp-config file is protected?
- Adding a SSL Certificate
- Add additional non-rewrite .htaccess directives on multisites via mod_rewrite_rules filter
- .htaccess Security Header Rules
- Only default permalink is working mod_rewrite enabled
- .htaccess in subdir gets ignored by WordPress’ own .htaccess in /
- Rules in .htaccess only if the requested URL is /wp-admin
- What to write in the htaccess in order to detect browser language and point accordingly?
- Built-In Postname Redirection vs Hard Redirects in relation to SEO and performance
- How to block access to files without modifying .htaccess or ngnix config? [closed]
- How To Fix A Redirect Chain
- .htaccess RewriteCond excluding directories does not work when there is an .htaccess or php.ini in subdirectory
- Separate 404 page for WordPress in subfolder
- Weird behavior of Dashboard, must be core files
- Remove trailing slash after .html extension
- Does WP suppresses .htaccess if permalinks are disabled?
- How do I setup htaccess for 301 redirects, post Joomla to WordPress migration? [closed]
- Hide a subdirectory on my website hosting
- Can’t access WP site over WiFi network
- Creating a copy of a website in a subdirectory, wp-admin redirect problem
- I am new in word pres my font awesome is not allow
- htaccess redirect throws an error: PHP Catchable fatal error: Object of class WP_Error could not be converted to string
- WordPress permalinks confusion
- Problem with WordPress permalinks
- Basic Auth .htaccess on wp-login, but allow logout from woocommerce
- Why my WordPress Site Asking for HTTP Authentication?
- htaccess redirects invalid request to home page not 404
- WordPress How to rewrite URL for custom pages
- How to properly give WordPress its own directory
- WordPress permalinks is wrong. It wants me to change my htaccess file. But then site crashes
- How to move wordpress website from hosting account to localhost
- Question with .htaccess and wp-login.php prevention
- WordPress RSS feed to external XML
- Does htaccess password keep search engines out?
- Pretty permalinks (again)
- htaccess old php pages to new wordpress ones
- different CNAME to corresponding subfolders
- block seacrh engines for all pages EXCEPT homepage
- Allowing access to certain WordPress created pages or posts with htaccess / htpasswd
- htaccess – Server Subdirectory With Different Name Than URL Subdirectory
- Add rewrite endpoint and .htaccess
- How To Add CSP frame ancestors in WordPress Website? [closed]
- How do I modify each instance of setcookie?