In order to use a friendly and brief URL, we often use URL rewrite for URL redirection. The ISAPI filter iirf described in this article has the following advantages.
1. open source and free.
2. Regular Expressions are supported.
3. supports multiple systems and IIS versions, Windows Server 2003 (including R2) with IIS6, Windows Vista SP1 or later with iis7, and Windows Server 2008 with iis7. I have used it in Windows 7 and iis7 environments.
4. The current version supports 64-bit systems. However, IIS running in 32-Bit mode must be used after testing.
Note the following steps to load iirf: otherwise, the load cannot be successful (note: the first two steps must be completed; otherwise, IIS cannot load iirf. dll ).
1. Copy iirf DLL (iirf. dll) and iirf. ini to the appropriate directory (determined by yourself) and add the read and execution permissions of the Everyone user to the directory.
2. Add IIS group permissions to the directory. In directory properties-security-advanced. Windows Server 2003 adds iis_wpg group permissions and Windows xp iusr _<Hostname>,Iis_iusr group permission is added to Windows 7.
3. In the attributes of a site that requires rewrite in IIS, on the ISAPI filtes tab, specify the iirf. dll path set in the preceding two steps.
4. Write a regular expression in the iirf. ini file to match your url. For example, redirect http: // IPaddress/1234-4567 to http: // IPaddress/search. aspx? ISSN = 1234-4567.
Note the following when running iirf:
1. Copy iirf. ini to the root directory of the site.
2. The 64-bit system ensures that IIS runs in 32-Bit mode. iis7 can be set directly on the interface, while IIS6 needs to execute the following command:
1>. Open the command prompt line and locate: % systemdrive % \ Inetpub \ adminscripts directory.
2> type the following command:Cscript.exe adsutil. vbs set w3svc/apppools/enable32bitapponwin64 "true"(This is a half-width double quotation mark ).
3>. Press enter.
3. At this time, ensure that the. NET Framework of "website-Attribute-ISAPI filtes" in IIS6 is 32-bit.
4. All the above are ready. Restart IIS. Even if the iirf. dll you added is unknown in ISAPI filtes, it does not matter if there is no green arrow. You can directly access the webpage. If the access is successful, the green arrow will appear.
5. If a red arrow appears, the loading is unsuccessful. You need to check whether your iirf. dll permission settings are set as described above, and whether your machine is 32-bit or 64-bit. After confirming these two points, there is basically no problem.
Iirf Source: http://iirf.codeplex.com/