简体   繁体   中英

Transfer ISAPI_Rewrite code to Built-In IIS7 Rewrite Engine

I've transferred my IIS6-based website to IIS7. It uses ISAPI Rewrite. I want to use the built in IIS7 rewrite engine. I have the following code in my httpd.ini file:

[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. What is different in the IIS7 rewrite engine between ISAPI Rewrite, and how can I fix it?

Thanks.

IIS Uses a seperate downloadable plug that will first need intalling.

Once that is complete, you just need to convert the RegEx ISAPI rules above to work with IIS7.

The RegEx principles and logic will be very similar, you'll just need to convert the syntax.

Theres a lot of info on the IIS.net site that will help you convert the rules.

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

I hope that helps

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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