I created page “play” url: http://localhost/myweb/play
and inside of page “play” I include PHP code to make the new search from outside WordPress.
And all worked, if I search from my page “play” the url will be: http://localhost/myweb/play?m=text+Search&pageno=1
Now, I want my search result url to be fancy url, like: http://localhost/myweb/play_text_Search_1.html
I have tried several add_rewrite_rules but not worked, return “404 not found”:
add_action('generate_rewrite_rules', 'add_rewrite_rules');
function add_rewrite_rules( $wp_rewrite )
{
add_rewrite_rule('^^([^-]*)_([^-]*).html$ play&m=$1&pageno=$2[1]', 'top');
flush_rewrite_rules(false);
}
ps: sorry my english is not good
Only way I knowit to do this it’s using this function:
It’s this you wanna do?