Iis 使用ISAPI_重写3在windows上进行301重定向

Iis 使用ISAPI_重写3在windows上进行301重定向,iis,redirect,Iis,Redirect,我有一个页面“/communities/communities.html”,我想将其重定向到“/communities.aspx” 我的httpd.ini文件看起来像这样,但我无法让它工作。它就像没有重定向一样 redirect 301 /communities/communities.html http://www.thecondopros.com/communities.aspx 请在您的站点根目录中尝试以下操作: RewriteEngine on RewriteBase / Rewrit

我有一个页面“/communities/communities.html”,我想将其重定向到“/communities.aspx”

我的httpd.ini文件看起来像这样,但我无法让它工作。它就像没有重定向一样

redirect 301 /communities/communities.html http://www.thecondopros.com/communities.aspx

请在您的站点根目录中尝试以下操作:

RewriteEngine on RewriteBase / RewriteRule communities/communities.html http://www.thecondopros.com/communities.aspx [R=302]
另外,ISAPI_Rewrite3默认为将重写规则文件命名为.htaccess,而不是httpd.ini。

或正确答案:

RewriteRule communities/communities.html http\://www.thecondopros.com/communities.aspx [I,R=301]
您可能希望我使其不区分大小写,并且希望R=301


有一些文档:

非常感谢。我昨晚花了很多时间在这上面。谷歌有很多关于如何做各种新奇的事情,但我找不到你刚才给我展示的方式,我的主机不允许我使用本机IIS重定向功能。