Using both this plugin and the WP rewrite rules
-
First of all, thank you for the amazing plugin!
We have an issue with using Custom Permalinks 2.4.0 together with some custom WordPress URL rules where the plugin conflicts with our code. More exactly, we create some pages automatically by using the following approach:
$targetUrl = 'index.php?someVar=foo'; $re = "^page\\/subpage$'; $new_rules[$re] = $targetUrl; $wp_rewrite->rules = $new_rules + $wp_rewrite->rules;This would add the
/page/subpageURL pointing to a PHP function which would serve the content on that page.This works fine, as long we do not have the
/page/parent page created with Custom Permalinks 2.4.0. When we create a page with this permalink, our PHP function will not be called anymore.The PHP function is invoked via the
add_action( 'parse_request', '...' )and by checking if we have got thesomeVarquerystring.After creating this new page using the Custom Permalinks plugin (
/page/), the parse_request callback is still called, but not withsomeVarbut simply with a querystring calledattachmentwhich is the pathname itself (/page/subpage).How can we solve this conflict between the WP rewrite rules and Custom Permalinks?
Thank you very much!
The topic ‘Using both this plugin and the WP rewrite rules’ is closed to new replies.