So I’ve solved this problem, but I’m still scratching my head about the “solution”:
add_rewrite_rule('api/autho/?$','index.php?__api=1','top');
This version of the rewrite rule works for some reason. I’m guessing that there’s some sort of namespace conflict that I accidentally stumbled across. Maybe /auth/ is used somewhere else?
Related Posts:
- Why doesn’t flush_rewrite_rules run on plugin activation?
- rewrite URL based on selected taxonomy for post page
- How to Rewrite WordPress URL for a Plugin
- Rewrite url for existing page without flush_rewrite_rules
- URL rewriting must be activated manually for my plugin
- How to change the URL pattern for single post view
- How To Consistently Enforce Rewrite Rule in Plugin Development
- Help With Rewrite_Rules For a Custom Plug-In
- Adding rewrite rule dynamically
- Problem with dinamic add_rewrite_rule()
- Remove custom post type slug from URL and add taxonomy Slug
- HowTo to add my rewrite rules at the beginning, redirect to the right page and flush the rules on plugin activation?
- How can I add rewrite rules to a class-based plugin?
- configuration of .htaccess for add_rewrite_rule to make sense
- Forward an old url rewrite scheme to a new one?
- How to link to custom “archive like” page with custom permalink rules “dynamically”
- Custom post type change permalink query
- Add variables from rewrite rules to query var
- Using meta_key & meta_value in add_rewrite_rule
- Any way to make Apache’s internal redirect work?
- Custom slug in url for CPT and taxonomy
- add_rewrite_rule not working
- How to Rewrite WordPress URL for a Plugin
- Virtual Page with Registration form
- How to use permalink query to go to specific tabs in posts
- How to Rewrite WordPress URL for a Plugin
- URL rewrite parameter lost (add_rewrite_rule)
- Custom rewrite, url path with parameters to a page
- remove “index.php” from permalinks
- Best way to flush_rewrite_rules for custom post type, in a mu-plugins plugin?
- Custom rewrite rules for archive page and single post
- WordPress Rewrite Rules for Custom Post Type and Taxonomy
- Multiple post types – share same ReWrite slug?
- Custom frontend page for plugin without a ‘physical’ page?
- How to add a custom URL placeholder to author archives?
- How to modify URL structures in custom post types and taxonomies or terms
- Make post slug have priority over category slug
- permalinks with get variables
- WordPress plugin how to run function when button is clicked
- Permalink rewrite with custom post type and custom taxonomy
- Filter to change the content of 404 page
- Add rewrite rule in plugin: with .htaccess in plugin folder or using WordPress functions
- Removing rules from .htaccess
- Mapping multiple URLs to same page
- flexible rewrite ‘ramble’ URLs with WordPress
- Permalinks for CPT breaks permalinks to pages
- Use an empty page to build custom plugin output
- Change the custom post type permalink
- External Rewrite Rules
- WordPress Rewrite rule for nested post types
- How to Modify Existing Rewrite Rules?
- How to restore WP 5.4 behaviour where a numeric string could added to each page URL and parsed as “page” in WP 5.5?
- How to set up Author archives with sub category URL
- remove sub-category of Custom Post Type from permalink structure
- WordPress add_rewrite_rule() cannot visit lower url levels
- How can I rewrite a URL to pass requests to a custom method via AJAX? (I can’t use admin-ajax.php)
- How to change custom post type permalink structure
- How can I turn a custom wordpress page into a product page?
- WordPress Custom URL
- How can achieve this permalink perfectly? domain.com/%category%/%post-name%
- How to remove specific category from URL in WordPress
- Changes in permalink structure in WordPress and how to apply to in-site links
- WordPress Persistent connection rule does not work for “posts”
- Custom Permalink to remove category word , keeping posts permalink with date?
- Custom permalink leads to index page
- how to change permalinks format for pagination?
- Possible to get all posts with my shortcode?
- wordpress how to replace url /bar with foo/bar for custom post type
- How to grab query string from wp-content/uploads/.*
- Combine multiple CPT names to create valid permalinks
- Getting back a permalink from custom url
- Route subpage to Custom Post Type
- Order custom post type posts by custom field with pretty URL
- Adding URL prefix for foreign language support
- Exclude single page from permalink rule
- help to remove last trailing slash using add_rewrite_rule
- How to create new content type and flushes rewrite rules without visiting the permalinks page?
- Rewrite permalink for multiple post types (CPT) with taxonomy term
- Plugin Development – Get Admin Url (Including cases where wp-admin is not used)
- Plugin architecture to pull from API & create dynamic content on WP site?
- Remove subcategory slug from url
- corrupted URLs – can’t leave starting page
- Rewrite URL for CPT to domain/post-name/post-id
- Multiple Taxonomy Items for Separate URLs
- Custom permalink structure for custom post types including multiple taxonomy
- Get the current post/page URL with plain permalinks
- Author Meta in Author URL Link
- No Ones Been Able to Override my WordPress Rewrite Rule Issue!
- Two CPT: one is using part of the custom rewrite slug from the other
- How to pass a more variable with page/subpage in Wordprees URL?
- WordPress custom post type rewrite rule matches all pages returning 404
- Custom pages with plugin
- Rewriting URLs with a query string
- How can I map a specific URL pattern to a plugin for processing
- Parent cpt/child custom post type URL permalink relationship
- WordPress custom permalinks, pages are now 404
- Custom post type permalink structure
- WordPress add parameters with friendly url structure
- Remove slug of multiple custom post types with and without hierarchical
- WordPress – Custom permalinks for advanced custom fields (ACF) using post type taxonomy