[英]301 redirect on windows with ISAPI_Rewrite 3
I have a page '/communities/communities.html' which i want to redirect to './communities.aspx" 我有一个页面“ /communities/communities.html”,我想将其重定向到“ ./communities.aspx”
my httpd.ini file looks like this but I cant get it to work. 我的httpd.ini文件看起来像这样,但是我无法使其正常工作。 It just acts like there is no redirect.
它就像没有重定向一样。
redirect 301 /communities/communities.html http://www.thecondopros.com/communities.aspx
Try this instead in your site root: 在您的网站根目录中尝试以下操作:
RewriteEngine on RewriteBase / RewriteRule communities/communities.html http://www.thecondopros.com/communities.aspx [R=302]
Also ISAPI_Rewrite3 defaults to naming the naming the rewrite rule file .htaccess
and not httpd.ini
. 同样,ISAPI_Rewrite3默认使用命名重写规则文件
.htaccess
而不是httpd.ini
的命名。
or, the correct answer: 或者,正确答案:
RewriteRule communities/communities.html http\://www.thecondopros.com/communities.aspx [I,R=301]
you probably want I
to make it case insensitive, and you want R=301
您可能希望
I
使其不区分大小写,并且您希望R=301
have some docs: http://www.isapirewrite.com/docs/ 有一些文档: http : //www.isapirewrite.com/docs/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.