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
- Does WordPress keep track of a post’s URL history and provide automatic redirects?
- Override default url for author pages?
- Masking wp-content/themes/name/images to just images directory using htaccess
- Using custom/dynamic “slug” for a page
- Passing parameters to a custom page template using clean urls
- How to add custom rewrite rule to .htaccess?
- Multiple endpoints to same page
- Use subdomain for certain urls
- Custom slug in front of search URL
- Display posts with author in the url with custom post types
- How to prevent redirection to max 2147483647 for larger values of the page query variable?
- How to append a URL parameter to all outbound URLs
- How to remove “admin.php?page=” from wp-admin using .htaccess?
- SEO Friendly URLs for my plugin categories
- Will references to ugly links automatically redirect to their pretty url permalink?
- How to create a specific frontend URL (not a Page) from a theme or plugin?
- how to add prefix to post url structor only
- How do I remove a word from a url in WordPress using .htaccess?
- Why does wordpress still strip my query var?
- Remove subfolders from URL
- Appending numbers to url do not break the link
- Rewrite rules in .htaccess get overwritten?
- Custom rewrite rules are sending everything to index.php
- WP Login forms action URLs displayed as pretty URLs in browser (ex with Restore Password)
- WordPress keeps writing rewrite rules to .htaccess
- WordPress Rewrite
- Dynamic URL, not a physical page within the database
- Passing & Reading URL Parameters with URL re-writing
- unexpected problem in url rewrite
- Tricky URL rewrite with custom values in url
- How to change page URLs to “www.site.com/page” instead of “example.com/blog/page” but keep post URLs as “example.com/blog/post”?
- Add_query_arg + two times the same argument?
- Redirecting all old links from previous EE site to new WP site in one go?
- WordPress 404 unless there is a space in url
- Change default URL of image attachment
- Taking a value from PHP_URL_PATH won’t work after WordPress 5.5 update
- Two “.htaccess” Files Located in Different Directories?
- Display content according to current URL
- WordPress redirection to get url friendly
- redirect 301 old url to new url
- Change WordPress comments url / word
- Add a query string to ALL links on site
- Add rewrite rule for rewrite endpoint
- Migrating a page to be an article
- Rewrite WordPress Custom URL
- Allow single quote in URLs
- How to get “extended” path info from URL in a plugin
- htaccess: Remove trailing slash from URL ending with .xml/ only
- External/non-WP rewrite rule without QSA
- Issue with using .htaccess to redirect feedburner feed
- How to check current URL for endpoint in a template file?
- How to perform a query at the URL?
- add_rewrite_rule not working for language specific characters
- Remove all categories from URL
- Custom rewrite rule
- Custom URL rewrite to specific page template
- Remove special characters in a URL
- Add query string to url and display it as normal url part /folder/
- Is there a way to create alias without using htacess, permalinks or delving into code?
- Define orderby in url
- hard flush_rewrite_rules() not regenerating .htaccess
- Map alt domain to specific section of website w/o MU
- Is there a ‘rake routes’ for wordpress?
- open all .docs in word online
- Rewrite rule to load images from production does nothing
- Cleanup URL for a custom page in wordpress
- WordPress rewrite rules don’t need ^?
- WordPress SSL (https) is not working with custom permalink
- How to add custom variable in url without redirect?
- Adding pretty query parameters
- Creating a dynamic URL structure
- How to redirect http://mydomain/blog/blahblah/ to http://mydomain/blahblah/ in wordpress htaccess?
- How to change the main site url on a multisite installation (network)?
- Append a query string to the end of every URL
- Adding rewrite rules directly to .htaccess file
- 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?
- WordPress redirects non-existing url to existing ones – how to disable
- My WP_options db rewrite_rules Does Not Work
- Disable Pagination on Pages