Problem with rewrite_rules_array
-
Hi Guys,
I want to use add_filter function as rewrite rule (.htaccess). So, I have the following Code:add_filter(‘rewrite_rules_array’,’addCustomPage’);
function addBuscador($rules){
$newrules = array();$newrules[“mynewpage/([^/]+)?$”] = ‘index.php?p=13 keyword=$matches[1]’;
$rules = $newrules + $rules;
return $rules;
}But when I go to my url https://MySite.com/mynewpage/somthing WordPress is redirecting to index.php?p=13 (Appears the address https://MySite.com/index.php?p=13 in my browser) and is not working as htaccess rewrite rule.
Could you help me? is possible that the function add_filter works as .htacess rewrite rule?
Thanks,
- The topic ‘Problem with rewrite_rules_array’ is closed to new replies.