Create an endpoint. In the callback function for the endpoint call your plugin functions internally, so the whole WordPress environment is available and you are still on the same domain, no matter where the plugin URL is.
Plus, make sure not to flush the rewrite rules on every page load, use the (de)activation hook for that.
Related Posts:
- How to Rewrite WordPress URL for a Plugin
- How to Rewrite WordPress URL for a Plugin
- Any way to make Apache’s internal redirect work?
- Mapping multiple URLs to same page
- Add rewrite rule for rewrite endpoint
- Rewrite url for existing page without flush_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 change the URL pattern for single post view
- Why doesn’t flush_rewrite_rules run on plugin activation?
- How To Consistently Enforce Rewrite Rule in Plugin Development
- Adding rewrite rule dynamically
- rewrite URL based on selected taxonomy for post page
- Help writing custom function with rewrite endpoint that generates a page from dynamic content
- add_rewrite_rule behaving strangely
- 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
- Custom post type change permalink query
- Using meta_key & meta_value in add_rewrite_rule
- How to pass a more variable with page/subpage in Wordprees URL?
- Custom slug in url for CPT and taxonomy
- add_rewrite_rule not working
- Mapping multiple URLs to same page
- Virtual Page with Registration form
- redirect word-press page with page values
- URL rewrite parameter lost (add_rewrite_rule)
- A tool to analyze rewrite rules? [closed]
- Custom pages with plugin
- How to call images from your plugins image folder?
- Making a plugin file accessible via url rewrite?
- How to add multiple custom URL variables?
- Add rewrite rule to permalink structure
- URL Rewrite + Page + Custom Post Type = Unusual Redirect
- Custom Rewriting to Plugin with Parameters
- Plugin to Consume a Web Service
- Custom endpoint that returns an xml
- URLs of plugin resources?
- Tricky URL rewrite with custom values in url
- Rewrite Point Doesn’t Work on Custom Taxonomy
- Does flush_rewrite_rules() remove all rules added by other plugins as well as mine?
- Add_rewrite_rule doesn’t add custom url in plugin
- Add a query string to ALL links on site
- How make a multi language routes, with rewrite rules or rewrite endpoints?
- Does WP Have a Function To Generate .htaccess RewriteCond?
- How to have multiple rewrite endpoints in the same URL?
- flush_rewrite_rules() not working on plugin activation
- URL rewriting must be activated manually for my plugin
- custom permalink/shortlink with base62 encoded post ID
- Redirect traffic to plugin
- How to Add a Rewrite Rule for Only One Page?
- Why is add_rewrite_endpoint incompatible with /%category%/%postname%/ permalink structure?
- How to add a Rewrite Rule / Category Structure
- Rewrite custom post type URL parameters
- Change pagination url format
- Problem with dinamic add_rewrite_rule()
- Remove custom post type slug from URL and add taxonomy Slug
- Enpoint Not Found in Rewrite Tag Permalink
- Create custom permalinks to show Custom Post Type’s relationship?
- Possible to get all posts with my shortcode?
- Redirect to another page using contact form 7? [closed]
- Rewrite /category/cars into /topics/cars
- custom wordpress rewrite
- Can’t retrieve body params from PUT endpoint using formdata
- Do I need to create an endpoint?
- WooCommerce Endpoints content
- REST Endpoint API 404
- How to list all images used on a specific page?
- How to rewrite URL and get the values?
- How to use wp rewrite to hide form action url?
- Forward an old url rewrite scheme to a new one?
- How to link to custom “archive like” page with custom permalink rules “dynamically”
- Custom Path for a Plugin
- Custom Endpoint – Does it possible to use PUT method with WP API Rest?
- Access to the template file of a plug-in
- Rewrite not working since upgrade to 5.9
- Getting incorrect filepath inside custom block front-end output using @wordpress/create-block tutorial
- Add variables from rewrite rules to query var
- WordPress rewrite rule depend on meta values not ids
- WordPress: I wanted to use Add rewrite rule multiple times for multiple CPT in my plugin
- Dynamic URL with rewrite rule not working
- Disabling Yoast, All-in-One, and Rank Math on Certain Pages within a Plugin
- WordPress Own Rewrite Rules
- Creating a return url for getting data from external api
- WordPress custom url without using any of the custom tags given
- Return raw image proxy for wordpress plugin
- How to force download a plugin generated file?
- a way to support totally different url structure
- Multiple Permalink Patterns for one page
- Plugins and how to assign urls to content
- Change url to posts if they have custom tax only
- Pagination appearing twice in URL after rewrite
- How can I send an id over the url?
- URL Rewrite for CPT single posts
- Apache rewrite rules and wordpress problem
- Use custom clean URLs for a plug in
- WordPress post-type create url rewriting
- How to use permalink query to go to specific tabs in posts
- WP Job Manger change jobs url (NOT slug)
- Menu Structure and URL structure, with Pages and Post-Type-Posts
- Custom rewrite, url path with parameters to a page