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
- add_rewrite_rule, plugin activation and plugin deactivation
- Plugin to Consume a Web Service
- URLs of plugin resources?
- Custom rewrite rules for feeds of custom queries (query_var query strings in URL)?
- 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 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?
- Custom rewrite rule serves content, but returns 404 error code
- flush_rewrite_rules() not working on plugin activation
- custom permalink/shortlink with base62 encoded post ID
- Redirect traffic to plugin
- How to Add a Rewrite Rule for Only One Page?
- Best way to hook a custom url?
- Why is add_rewrite_endpoint incompatible with /%category%/%postname%/ permalink structure?
- Append country to ‘pretty’ url but serve same page
- 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
- 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
- Create page (not the post type) dynamically
- WooCommerce Endpoints content
- REST Endpoint API 404
- How to rewrite URL and get the values?
- Do rewrites added with add_rewrite_rule() persist after plugin deletion?
- How to use wp rewrite to hide form action url?
- Forward an old url rewrite scheme to a new one?
- Rewriting Image URLs from dynamic to original
- Custom Path for a Plugin
- The URL of images on my website changed after being set as featured image
- 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
- How to save page URL as a favorite
- Custom route and extract data from slashes and parameter
- Getting incorrect filepath inside custom block front-end output using @wordpress/create-block tutorial
- Add variables from rewrite rules to query var
- Change cannonical URL after changing url with add_rewrite_rule()
- 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
- Multiple URL rewrite rules and get every prams
- Using a template file for a specific custom URL
- WordPress Own Rewrite Rules
- WordPress custom url without using any of the custom tags given
- 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
- Pagination appearing twice in URL after rewrite
- How can I send an id over the url?
- Is it possible to rewrite a page url Without setting the permalinks to Post Name?
- 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