can not rewrite url
-
Hi
I am trying to rewrite url the ends with “222” to url that ends with “34” in wordpress.
e.g. http://www.example.com/author=222 —> e.g. http://www.example.com/author=34
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.
- The topic ‘can not rewrite url’ is closed to new replies.