simple rewrite rules
-
Hello,
I need to understand the concept of rewrite_rules pf wordpress developped in page :
https://codex.www.ads-software.com/Class_Reference/WP_Rewriteexemple I need to write a new rule : put string/ before post to have something like that :
https://www.mydomain.com/mystring/%postname%/what’s the code to add ? (line to change)
—-
// flush rules
function my_insert_rewrite_rules( $rules )
{
$newrules = array();
$newrules[‘(project)/(\d*)$’] = ‘index.php?pagename=$matches[1]&id=$matches[2]’; // line to change
return $newrules + $rules;
}(…)
thanks a lot
- The topic ‘simple rewrite rules’ is closed to new replies.