我想访问插件文件(当<a>
,而不显示文件的实际路径。我正在使用以下重写规则:
add_rewrite_rule( \'continue/([0-9]+)/?$\', \'wp-content/plugins/my-plugin/continue.php?where=$matches[1]\', \'top\' );
请求被重定向到continue.php
但我总是$_GET[\'where\']=$matches[1]
而不是$_GET[\'where\']=123
内部继续。php。它应该被一些数字所取代。我想要类似的东西this
Update
我试过了Monkeyman Rewrite Analyzer 但我的规则没有体现在里面。那为什么我会被重定向到正确的页面?e、 g.对于continue/2
它具有以下输出:
(.+?)(/[0-9]+)?/?$ pagename: continue page: /2