I am trying to rewrite "222" to "34" in wordpress. I have added these lines to my function.php:
add_action( 'init', 'mydid_add_rewrite_rules' );
function mydid_add_rewrite_rules() {
global $wp_rewrite;
add_rewrite_rule( '222', '34','top');
$wp_rewrite->flush_rules();
}
However, that doe not work. the link with "34" works, but with the "222" doe not. I also checked with monkeyman-rewrite-analyzer and it seems that the rewrite rule is not inserted. Why? I AM flushing...
Thanks a lot.