It is atypical to edit .htaccess
for custom rewrite rules, usually there is no need. WP works on passing everything to its PHP core and sorting it out there.
For your specific use case I suspect you would have better lack using rewrite endpoint. It is quite robust way to handle an extra level in WP URLs and saves a lot of headache, comparing to custom implementation.
Related Posts:
- Querystring parameter getting lost in rewrite rule
- Custom post types and custom variables — add_rewrite_tag() question
- WordPress Custom URL Rewrites
- Does add_rewrite_rule(..) only accept “index.php” as redirect target?
- Cyrillic characters in rewrite rules cause 404 Not Found errors
- Custom Endpoint Gives 404 Header
- Clean URLs for custom $_GET variables
- Making extra parameters optional
- why is are these rewrite_tags and rules not working?
- Redirect taxonomy to custom template to list terms in taxonomy
- How to change the matches in add_rewrite_rule
- resolve /author/ to a page or archive (of all authors) template
- Multiple values in a rewrite rule, is it possible?
- What add_rewrite_tag()’s RegEx matches against?
- add_rewrite_rule() not working
- add_feed and flush_rewrite_rules
- Rewrite rules and query for virtual page
- Best action to call add_rewrite_rule
- add_rewrite_rule confusion
- add_rewrite_rule isnt working, not getting added to rules array, why?
- add_rewrite_endpoint not working
- Associate the “add_rewrite_endpoint” and “$_GET”
- Custom Rewrite rule to match anything not already matched by WordPress
- How to use rewrite rule or rewrite endpoint to switch languages?
- Remove rewrite endpoint on deactivation?
- Do I need to flush rewrite rules when creating new user if using custom author rewrite rules?
- Add Rewrite Endpoint to CPT Archive
- Optional all capture groups in rewrite rule
- Rewrite rule : custom post type with 2 numeric variiables
- Does it still make sense using json endpoint ep_mask now that there’s the new rest api? [closed]
- Simple page URL rewrite with add_rewrite_rule()
- Optimal code for two add_rewrite_rule’s
- Custom URL rewrites work, but break my permalinks
- add_rewrite_rule – Additional subpages for author pages
- How do I flush rewrite rules
- Pass query vars to front page
- rewrite url in wordpress
- Making extra parameters optional
- My add_rewrite_rule is returning a 404
- Rewrite rule for path of favicon.ico ( Add_rewrite_rule function possible ? )
- wordpress add_rewrite_rule not working
- FLUSH_REWRITE_RULES – after or before REGISTER_POST_TYPE?
- Using get_query_var() from a plugin
- force_ssl_admin() causing issues with preview links
- $wp_rewrite->rules is always NULL
- WordPress CPT slug and page slug conflicts
- Mod_rewritte – remove ?m=1 from url
- help with custom rewrite rules
- Order of rewrite rules when calling add_rewrite_rule
- Rewrite Rule for Post Meta
- add_rewrite_rule() not stored (I think)
- custom permalink for single post category
- WordPress add_rewrite_rule second argument not working
- WordPress rewrite does not work for some reason
- Rewrite rules ignored
- Adding a custom rewrite rule for gallery/categories page
- add_rewrite_rule issues
- Add_rewrite_rule doesn’t seem to work?
- add_rewrite_rule to search
- Why isn’t my rewrite rule working when there is no second parameter?
- Rewrite rules applied differently after upgrade
- Leverage WP_Rewrite to pre-validate links / detect invalid links
- Is it possible to add a site-wide add_rewrite_rule for a multilingual site?
- When request has multiple matching rewrite rules, and matched rule returns 404 – iterate to next rewrite rule
- WordPress – replicate same globals, query vars and query for an alternate endpoint
- add_rewrite_rule not working for blog category page
- get_author_posts_url() doesn’t return the author URL, because of wrong author_structure
- rewrite rule not working: redirect to php script if file exists
- add_rewrite_rule only works when flush first
- Homepage rewrite rule
- custom rewrite rules will not be added to wordpress rewrite_rules database
- rewrite rules problem with #comments-2345
- Rewrite post type into a page with year filter
- Why isn’t my rewrite rule for add_rewrite_rule not working as expected?
- Custom Fields Query Vars and Rewrite not working
- WordPress matching URLs with trailing tildes code correction
- A part of regular expression in add_rewrite_rule function not working
- Flush rewrite rules when every page gives 500 error?
- Using add_rewrite_rule in conditional statement using $_SERVER
- default ‘post’ post type: not forcing url rewrite when args set
- How to add rewrite rule to point to file
- Complex rewrite rules with multiple variables, some the same
- how to use mutliple add_rewrite_rule?
- Social sharing conflict with Rewrite rules
- Rewire Rules Front Page
- WordPress URL rewrite after changing web from Joomla
- Adding custom slugs: parent-page/username/child-page/
- Changing default slug of post to the post id
- How bad is flush_rules() on init hook?
- Where to hook to bypass instantiating WP_Query?
- Rewrite for page with a possible unknown parent page
- Passing variables in the permalink structure on a custom post type
- WordPress Rewrite Rules
- add_rewrite_rule with trailing slash redirects
- nginx + W3 Total Cache: rewrite rules issue [closed]
- add_rewrite_rule() driving me crazy, rewrite not working when analyzer says it should
- Redirect to a file in a WordPress theme directory
- What is the `rewrite_rules` option the options table in the WordPress database?
- Rewrite rule to index.php in theme subfolder
- rewriteRules WP6