Wordpress添加\重写\规则在Apache上工作,而不是在IIS上工作

Wordpress添加\重写\规则在Apache上工作,而不是在IIS上工作,wordpress,apache,iis,rewrite,url-rewrite-module,Wordpress,Apache,Iis,Rewrite,Url Rewrite Module,我有以下重写规则: add_action( 'init', 'custom_rewrite_rules' ); function custom_rewrite_rules() { add_rewrite_rule('formation(/([^/]+))?(/([^/]+))?/?','index.php?pagename=formation&formation_slug=$matches[2]&formation_id=$matches[4]','top');

我有以下重写规则:

add_action( 'init', 'custom_rewrite_rules' );
function custom_rewrite_rules() {
    add_rewrite_rule('formation(/([^/]+))?(/([^/]+))?/?','index.php?pagename=formation&formation_slug=$matches[2]&formation_id=$matches[4]','top');
    add_rewrite_tag('%formation_slug%','([^&]+)');
    add_rewrite_tag('%formation_id%','([^&]+)');
}
这在我的Apache服务器上运行良好,而在我客户端的IIS上运行不好。 我刷新了重写规则,Monkeyman重写分析器插件告诉我重定向应该按计划工作

有没有关于我遗漏了什么的建议

事先非常感谢你的帮助


编辑:起来

问题在于IIS不接受URL中的“+”字符,而我正在使用urlencode和URLEDECODE生成URL

我实现的变通方法只是将“+”替换为“-”