ISAPI
Rewrite is the most widely used rewrite component in IIS. With this component, You can implement the mod_rewrite function in Apache. For Seo, is the basic equipment for 301 redirection in IIS.
Currently, most of the versions on the Internet are older than version 1.3. We recommend that you use the latest ISAPI rewrite 3 with better functions and more flexible and rich rules. ISAPI rewrite 3 is divided into commercial version and free Lite version. For commercial version, you can place an httpd. ini on each site to set the rule separately. The free version can only write the rule to
In the httpd. conf file, it acts on the global.
Download ISAPI rewrite 3
ISAPI rewrite 3 official download
A green version of ISAPI rewrite 3 lite has been created for the website construction of Shenda. A large file is uploaded to the Baidu cloud network disk. Click here to download it. Green Edition needs to be manually added
ISAPI filter. For the method, refer to the IIS rewrite configuration I wrote earlier.
ISAPI rewrite 3 common 301 redirection rules
The ISAPI rewrite rules of different versions are slightly different. This Help file provides detailed rule reference, with several common statements:
The following 301 rules only apply to ISAPI rewrite 3. Do not use them for other versions!
1. Redirect "domain.com" 301 to "www.domain.com"
Rewriteengine on
Rewritecond % {HTTPS} (on )?
Rewritecond % {http: Host} ^ (?! Www.) (. +) $ [Nc]
Rewritecond % {request_uri} (. +)
Rewriterule .? HTTP (? % 1 s): // www. % 2% 3 [R = 301, l]
2. Redirect 301 to another domain name
Rewritecond % {http: Host} ^ www.llllllesishu.cn $
Rewriterule (. *) http://www.sendnet.cn $1 [NC, r = 301]
3. redirect a single page in 301
Rewriterule ^/oldpage.htm $ http://www.sendnet.cn/newpage.html [R = 301, l]
The identifiers (such as NC, R, L, etc.) are not listed. You can download the Help file or view it here.