I have created a plugin and i have gotten rewrite rules to work using my .htaccess file. I would like to make this work from my plugin instead to keep everything contained from within there.
Im trying to do this via the wordpress rewrite but nothing i do it working with this. I have even tried a basic rewrite and it wont work either. readme.html is a page in the root directory. I simply want testpage to display this page. The other rules i have in my .htaccess are far more complicated than this so, if i cant get this one to work i have no hope with the complicated ones.
add_action('init', 'add_actor_url');
function add_actor_url()
{
add_rewrite_rule('^testpage','readme.html','top');
flush_rewrite_rules();
}