简体   繁体   English

将ISAPI_Rewrite代码传输到内置IIS7重写引擎

[英]Transfer ISAPI_Rewrite code to Built-In IIS7 Rewrite Engine

I've transferred my IIS6-based website to IIS7. 我已经将基于IIS6的网站转移到IIS7。 It uses ISAPI Rewrite. 它使用ISAPI Rewrite。 I want to use the built in IIS7 rewrite engine. 我想使用内置的IIS7重写引擎。 I have the following code in my httpd.ini file: 我的httpd.ini文件中包含以下代码:

[ISAPI_Rewrite]
RewriteRule /httpd(?:\.ini|\.parse\.errors).* / [F,I,O]
RewriteRule ^(.*)$ http://www.workcity.co.il/$1 [R,R=301]
RewriteRule /([^/.?]+) /sc.asp?p=$1 [I,L]
RewriteRule /products/([^/.?]+) /sp.asp?p=$1 [I,L]
RewriteRule /מוצרים/([^/.?]+) /sp.asp?p=$1 [I,L]

But it dosen't work in IIS7 Rewrite Engine. 但是它在IIS7重写引擎中不起作用。 What is different in the IIS7 rewrite engine between ISAPI Rewrite, and how can I fix it? IIS7重写引擎在ISAPI Rewrite之间有什么不同,如何解决?

Thanks. 谢谢。

IIS Uses a seperate downloadable plug that will first need intalling. IIS使用一个单独的可下载插件,该插件首先需要安装。

Once that is complete, you just need to convert the RegEx ISAPI rules above to work with IIS7. 一旦完成,您只需要转换上面的RegEx ISAPI规则即可使用IIS7。

The RegEx principles and logic will be very similar, you'll just need to convert the syntax. RegEx的原理和逻辑将非常相似,您只需要转换语法即可。

Theres a lot of info on the IIS.net site that will help you convert the rules. IIS.net站点上有很多信息,可帮助您转换规则。

http://learn.iis.net/page.aspx/460/using-url-rewrite-module/ http://learn.iis.net/page.aspx/460/using-url-rewrite-module/

I hope that helps 希望对您有所帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM