The URL is then example.com/myslug (where myslug is the
permalink from the page). There is no model parameter however.
That happens because you used the wrong parameter for the Page ID:
The p parameter corresponds to a fixed page ID I have created.
So actually, for the page post type, i.e. Pages, you should use page_id and not p. See the documentation for more details.
So you just need to replace the index.php?p= with index.php?page_id= and your rewrite rule will work correctly, but remember to flush the rewrite rules manually via the Permalink Settings admin page. (Simply visit the page and WordPress will automatically flush the rules without you having to click the Save Changes button)
Related Posts:
- How to Rewrite WordPress URL for a Plugin
- Rewrite url for existing page without flush_rewrite_rules
- 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
- 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
- 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 Rewrite WordPress URL for a Plugin
- A tool to analyze rewrite rules? [closed]
- Custom pages with plugin
- Making a plugin file accessible via url rewrite?
- Add rewrite rule to permalink structure
- Custom frontend page for plugin without a ‘physical’ page?
- add_rewrite_rule, plugin activation and plugin deactivation
- Custom Rewriting to Plugin with Parameters
- Plugin to Consume a Web Service
- 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
- External Rewrite Rules
- 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
- Does WP Have a Function To Generate .htaccess RewriteCond?
- Custom rewrite rule serves content, but returns 404 error code
- flush_rewrite_rules() not working on plugin activation
- URL rewriting must be activated manually for my plugin
- 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?
- Redirect traffic to plugin
- Custom url for a plugin page add_rewrite_rule WordPress
- Append country to ‘pretty’ url but serve same page
- How can I rewrite a URL to pass requests to a custom method via AJAX? (I can’t use admin-ajax.php)
- Help With Rewrite_Rules For a Custom Plug-In
- WordPress Custom URL
- Problem with dinamic add_rewrite_rule()
- Remove custom post type slug from URL and add taxonomy Slug
- Help writing custom function with rewrite endpoint that generates a page from dynamic content
- Possible to get all posts with my shortcode?
- Create page (not the post type) dynamically
- How to grab query string from wp-content/uploads/.*
- Do rewrites added with add_rewrite_rule() persist after plugin deletion?
- Plugin Development – Get Admin Url (Including cases where wp-admin is not used)
- Forward an old url rewrite scheme to a new one?
- Plugin architecture to pull from API & create dynamic content on WP site?
- Rewriting Image URLs from dynamic to original
- How to link to custom “archive like” page with custom permalink rules “dynamically”
- Custom Path for a Plugin
- Access to the template file of a plug-in
- Rewrite not working since upgrade to 5.9
- Add variables from rewrite rules to query var
- Change cannonical URL after changing url with add_rewrite_rule()
- 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
- Disabling Yoast, All-in-One, and Rank Math on Certain Pages within a Plugin
- WordPress Own Rewrite Rules
- WordPress custom url without using any of the custom tags given
- How to force download a plugin generated file?
- How to pass a more variable with page/subpage in Wordprees URL?
- Custom pages with plugin
- Rewriting URLs with a query string
- How can I map a specific URL pattern to a plugin for processing
- How can I send an id over the url?
- Apache rewrite rules and wordpress problem
- Mapping multiple URLs to same page
- Use custom clean URLs for a plug in
- How to use permalink query to go to specific tabs in posts
- redirect word-press page with page values
- Custom rewrite, url path with parameters to a page
- What is wrong with using add_option with Multisite instead of add_blog_option in a plugin
- How to modify post content before writing to database?
- $wp_filesystem returns NULL. What are the dependencies?
- My WP_options db rewrite_rules Does Not Work
- $reverse_top_level works the opposite way according to Codex?
- How to serve different thumbnails/images depending on users browser/platform
- How to export post meta with images in wordpress
- Add Minimum Dimensions Text to Featured Image
- WordPress class, using add_action to call member function does not work
- random code at the end of file after plugin upload
- How Can I add Fields in wp-option table?
- Clean way to initialize plugin in newly-added site when plugin has been network activated?
- How to deal with different jQuery versions?
- Can I attach a plugin via my add_filter callback contents?
- Is “document loaded” different on admin side than public side?
- Yoast and another plugin
- Handle changed Woocommerce function
- Add admin settings and options
- mysql_real_escape_string() error using xml2ary in WordPress plugin
- Developing a wordpress.com shortcode [closed]