You don’t have to touch the Apache configuration for this, you can do this all from the WordPress rewrite system. But indeed, your general idea is correct: you should append ?cat=3 (or category_name=blog if you want to be even clearer). Remember that your blog archive can have multiple pages, maybe you want to handle this too.
This is how I would do this from inside WordPress:
add_action( 'init', 'wpse7379_init' );
function wpse7379_init()
{
add_rewrite_rule(
'blog(/page/([0-9]+))?/?$',
'index.php?category_name=blog&paged=$matches[2]',
'top'
);
}
Related Posts:
- How to create custom URL routes?
- Masking wp-content/themes/name/images to just images directory using htaccess
- How to change default page slug?
- Mod_rewrite delete parameter in 301 Redirect
- Sub domain redirection to taxonomy
- Need to make a php file inside theme accessible via url
- Evaluating a external rewrite rule before internal wordpress rewrite rule
- Rewrite rule to load images from production does nothing
- Rewrite Rules Are Redirecting and Not Passing VARs
- WordPress rewrite rules don’t need ^?
- Adding rewrite rules directly to .htaccess file
- Custom rewrite not working
- WP is ignoring .htaccess rewritten URL
- a one-off rewrite rule
- Rewrite wp-login.php URLS to static pages?
- Need help with simple rewrite rule (shouldn’t this be easy?)
- Change htaccess to redirect to index.php in subfolder
- Rewrite custom post type URL parameters
- How to remove wordpress directory slash
- Rewrite URLs – Custom Post Type – Post Slug, Taxonamy Slug
- URL Rewriting for PHP script on an image URL
- Change pagination url format
- How to redirect specific URL to Subdomain
- Rewriting “pretty” blog category URL with htaccess / add_rewrite_rule() causes 404 page
- How to rewrite wordpress urls with index.php in them
- Custom Rewrite rule to captured post (rewrite rule to rewrite rule)
- Map secondary domain to other’s virtual subfolder
- URL rewriting with custom user meta “/%shop_name%/gallery/%gallery%”
- Changing URL scheme, mod_rewrite not helping
- Localize URL bases
- How can I create custom URL routes?
- force www rewrite if wordpress put in a folder
- Rewriting a date hierarchy into a ‘yyyy-mm-dd’ slug
- How do I make WordPress revise an .htaccess file a certain way?
- modify URL with mod_rewrite or hook
- How to change an existing wordpress page rewrite rule?
- Pretty URL via Rewrite
- ModRewrite not working properly
- Custom Rewrite for Profiles
- Function to rewrite URl in WordPress
- help with rewrite_tag and rewrite_rule for custom page GET variables [duplicate]
- Can’t get pretty permalinks to work without index.php
- How to redirect a virtual page (e.g. /blog) to the home page?
- Please give me the rewrite rules for my ugly urls
- Add rewrite endpoint and .htaccess
- Is it possible to use the same slug structure for a taxonomy and for some pages?
- Rewrite Slug for CPT Archive Pages to Plural Name of Slug
- Change author base slug for different roles
- How to add custom rewrite rule to .htaccess?
- Problem with add_rewrite_rule and pagination (paged and page query_vars)
- Custom Permalinks for Blog Posts Only
- How to show the same content on multiple URLs?
- Using a page template without a page
- How to seamlessly redirect between different archive and singular slugs?
- Overwrite rewrite-slug of built in post-type ‘post’
- When to call `add_rewrite_rule` for safety
- URL rewrites and pagination
- Rewrite Rule for Post “Subpage”, with pagination
- unexpected problem in url rewrite
- Rewrite loading custom template file but is_home() returns true, and there’s no 404
- Rewrite rule for admin-ajax.php
- Cache issues with redis and nginx
- Adding more pages to author pages
- Add query string to url and display it as normal url part /folder/
- Flush Rewrite Rules on init or rest_api_init?
- WordPress .htaccess – route other URLs to another app
- How to properly rewrite url by custom var
- Preserve Domain Alias
- How to building pretty URLs to reflect category hierarchy?
- Attachment page gives 404 if user not logged
- Rewrites: .htaccess or wp_rewrite for bulk 301 changes?
- How to change the Author Slug from Username to Nickname and deal with Special Characters
- Pretty URLs and rewrite
- ngnix Url rewrite doesn’t work
- Rewrites rules disappear after a while
- Is it possible to create dynamic endpoint URLs?
- Using WP Rewrite to rewrite custom urls in this scenario
- How can i ensure that SQL statements are not displayed if an enduser types the wrong variable name in the URL
- Proper way to set up rewrite with Wp
- Change /search to /somethingelse
- Using custom url parameters in a page
- Rewrite custom taxonomy slug – but only parent items
- WP returns to domain root instead of siteurl
- How to pass username in url
- Problem building an url with argument
- URL Rewrite and Archive Template Files – Post Type vs. Taxonomy
- Need help adding rewrite rules to page
- How to retrive previous Domain URL in Wp
- Rewrite rule is catching pages not posts
- Migration from old CMS to WordPress 301 redirection rules?
- How to change blog category, author URL in wordpress
- Using add_rewrite_tag to create urls for page sections
- URL Variables in a Certain Page
- Two Rewrite Rules
- How to make wordpress use www.example.com/blog/wp-includes/ instead of www.example.com/wp-includes/?
- Can I exclude a single URL from a rewrite plugin?
- Need help with regex
- Rewrite Page Parameters
- add_rewrite_rule doesn’t work when trying to add a new parameter at the end of URL
- How to make such a structure for cpt?