I want to access a plugin file (when
<a> is clicked) without exposing actual path of the file. I am using the following rewrite rule:
add_rewrite_rule( 'continue/([0-9]+)/?$', 'wp-content/plugins/my-plugin/continue.php?where=$matches', 'top' );
The request is redirected to
continue.php but I always get
$_GET['where']=$matches instead of
$_GET['where']=123 inside continue.php. It should have been replaced by some number.
I want something similar to this
I have tried Monkeyman Rewrite Analyzer but my rule does not show up in it. Then why am I being redirected to the correct page?
continue/2 it has the following output:
(.+?)(/[0-9]+)?/?$ pagename: continue page: /2