You can not do that viw .htaccess because .htacces rules can not control how the permalinks are generated by WordPress. Instead, go to WordPress settings->permalink. Select custom structure and enter:
blog/%category%/%postname%
Related Posts:
- Clash of the rewrites
- Hijacking the URL for filtering
- custom htaccess rewrite rule for page
- Prevent WordPress from automatically correcting URLs
- Server (WordPress) redirects files that are not supposed to (using htaccess)
- Alias ‘wp-content’ directory to something shorter (framework?)
- WordPress .htaccess – route other URLs to another app
- Changing RSS feed URL structure
- add_rewrite_rule fro html to another url not working
- Preserve Domain Alias
- Wildcard forward all posts and pages with few exceptions
- React Router with WordPress
- Is WordPress API visible from PHP file called in htaccess
- WordPress is adding “category” word before my actual category name in url (and this is unsolicited)
- Multiple permalink with and without category for same post
- Rewrite URL to get rid of wp-content etc and change URL
- Use a template file for a specific url without creating a page
- Multiple endpoints to same page
- How to remove “admin.php?page=” from wp-admin using .htaccess?
- SEO Friendly URLs for my plugin categories
- How to create a specific frontend URL (not a Page) from a theme or plugin?
- Rewrite rules in .htaccess get overwritten?
- WordPress keeps writing rewrite rules to .htaccess
- WordPress Rewrite
- Dynamic URL, not a physical page within the database
- Taking a value from PHP_URL_PATH won’t work after WordPress 5.5 update
- Display content according to current URL
- Allow single quote in URLs
- htaccess: Remove trailing slash from URL ending with .xml/ only
- Remove all categories from URL
- Custom URL rewrite to specific page template
- Map alt domain to specific section of website w/o MU
- Rewrite rule to load images from production does nothing
- WordPress SSL (https) is not working with custom permalink
- Creating a dynamic URL structure
- Append a query string to the end of every URL
- Double domain name in category URL-s
- Access files at new location using old file paths
- NextGEN Gallery Lightbox – Social Share URL Redirect
- Url Rewriting a dynamic wordpress page
- WordPress .htaccess blocks mine?
- My WP_options db rewrite_rules Does Not Work
- Rewrite Preview URL to include index.php
- How to disable URL rewriting for specific URLs?
- Adding special characters to slug?
- subdirectory install breaking existing links
- a one-off rewrite rule
- How can I dynamically generate an image with a static image URL?
- Rewrite custom post type URL parameters
- How to remove wordpress directory slash
- Changed pagination URLS to use p= instead of paged=
- Translate custom post type and taxonomy slug in URL?
- Right url for custom post type
- Preserve old website URL structure after migrating to WordPress
- Change pagination url format
- joomla to wordpress migration and 404 errors issues [closed]
- Rewriting “pretty” blog category URL with htaccess / add_rewrite_rule() causes 404 page
- Redirecting /px/?q=x to /px/x/
- URL redirect on updating the post date
- WordPress keeps writing rewrite rules to .htaccess
- Changing URL scheme, mod_rewrite not helping
- mod-rewrite exception? keep #hash in matching urls?
- ow to change cutsom page url of wordpress site using htaccess
- custom wordpress rewrite
- Flushing rewrite rules
- Two sets of url one content?
- WordPress .htaccess ignore path and subsequent .htaccess files in subfolders
- Overwrite WordPress’s URL rewrite not working
- 404 redirect based on url
- Rewriting a date hierarchy into a ‘yyyy-mm-dd’ slug
- Get logged in username in wordpress url
- URL problem: www.sitename.com/blog and www.sitename.com/learn using same WP installation
- custom url – add attachment’s id or name after post
- Make the home page’s slug visible in the browser’s URL bar
- dynamic URL rewrite
- Exclude subfolder in WordPress permalink
- Point 404 pages to homepage
- WordPress pagination broken for page 2,3 with custom permalink. Redirects to baseurl
- How to Update / Change URL when Popup Modal Loads?
- Pretty URL via Rewrite
- url redirect none www to www
- Rewrite URL for attachments
- Moved WordPress to Subdirectory, still hijacking requests to files outside of its directory
- How to add gallery slug to attachment url?
- How to remove Base URL Duplication?
- Rewrite URL query string for all pages
- Pagination appearing twice in URL after rewrite
- ModRewrite not working properly
- URL Rewrite for CPT single posts
- Simple URL rewriting gone wrong
- What is the proper way to use add_rewrite_rule to remove the (question mark)?
- WordPress post-type create url rewriting
- How can i maintain permalink structure and avoid a 404 error when loading external content?
- How to prevent URL-modification when page title contains digits only?
- Can’t get pretty permalinks to work without index.php
- How to redirect a virtual page (e.g. /blog) to the home page?
- How do I display a friendly URL link in the frontend?
- How to rename the WordPress wp-login.php running on IIS6?
- Please give me the rewrite rules for my ugly urls
- Rewrite Page Parameters