No ISAPI Rewrite full play multiple site pseudo static _win server

Source: Internet
Author: User
IIS to increase the URL Rewrite function, the most people choose is called "ISAPI Rewrite" software, online download the cracked version, in fact cracked imperfect, eventually will not be used.

Look again, find the Ionic ' s Isapi Rewrite Filter, completely open source, completely free, completely without the Chinese manual.

After the test, use the normal, usage share:

First to the official website http://www.codeplex.com/IIRF/Release/ProjectReleases.aspx or to the cloud Habitat community to download (http://www.jb51.net/softs/40097.html Download the latest package and note that the version number may change as you download the Ionicisapirewriter-2.0-release-bin.zip. The following installation is for win2003+iis6.0 server environments only.

I. Installation of IIRF

1, copy the IIRF DLL (IIRF.dll) to the appropriate folder, such as D:\Rewrite. Or, it can be in a completely different directory tree. It depends on you.

2. If you create a server global scope settings file (Iirfglobal.ini), you must put it in the same directory as the (IIRF.dll) file. The URL rewrite filter will look for its global settings file in the file. In the case of multiple sites, create (IIRF.dll) files under the site's more directory.

3. Give the IIS_WPG user group read, read and run, write permissions to the directory (IIRF.dll).

4, open Internet Information Services Manager. Right-click on the left column of IIS Manager "website" "Properties", pop-up "Web Site Properties" tab, select "ISAPI Filter", add IIRF as shown below.

Baidu Weight Query Webmaster Trading Links Exchange website construction, website design, enterprise build station to find 313

5. Restart IIS

6, right click on the left column of IIS Manager "website" "Properties", pop-up "Web Site Properties" tab, select "ISAPI Filter" to see if the "IIRF" load succeeded. If the green up arrow indicates that the load was successful.

Second, the rules file format basically copy ISAPI Rewrite, to make changes rewriterule [source URL Regular condition] [destination URL]
The difference between an ISAPI rewrite and a IIRF is to be escaped by the [intent Url],isapi rewrite, and IIRF without escaping.
If there are existing ISAPI rewrite rules on the web that can be copied directly, removing the backslash (\) in the [destination URL] One at a IIRF can be used.
After you know this, you can easily communicate with people on the internet, according to the ISAPI rewrite Exchange, and finally the escape character (\) deleted on the line.

Third, log settings

The log value can be set to 0-5 in Iirf, and two lines are set for the log type at the beginning of the rule file
Rewritelog C:\Rewrite\supesite\iirfLog.out (Note to write clear path, different sites)
Rewriteloglevel 0 (0 for no class, 3 for general test, 5 for handling failures)
The expensive log, at the same time does not automatically delete files, log type must be set to 0, unless used for inspection can be modified to other values, after the check must be changed to 0, otherwise the log file to the hard disk full of trouble.
If the log is not 0, when the filter is enabled, the corresponding folder produces a file similar to the following, which is in text format and can be viewed in Notepad.
Iirflog.out.12345.log

Four, view the configuration

By entering the following configuration parameters in the Iirf.ini file, you can easily view the current IIRF configuration by using a browser
Statusurl Iirfstatus
Statusinquiry on
Enter Http://localhost/iirfstatus in the browser to view.

Rule documents can be modified at any time, at any time effective!

Attached WordPress IIRF Rules

First to WordPress background settings fixed connection:/post/%post_id%.html
Then create (Iirf.ini) files in the root directory of WordPress's Web site and add the following rules to the file:
Copy Code code as follows:

Rewriteloglevel 0
Rewritelog E:\flyingblue\logfiles\IIRFLOG\log
Statusurl Iirfstatus
Statusinquiry on

rewriterule/index.html$/index.php [L]

<ol>
<li>from Accessing through Http</li>
<li># WordPress rewrite rules#</li>
<li># Below is for permalink like/post/%post_id%.html</li>
<li># provided by sideblue</li>
<li># url:<a href= "http://ivup.cn</li>" rel=nofollow>http://ivup.cn</li></a>;
</ol>

Rewritecond%{request_filename} ^wp-content.*
Rewritecond%{request_filename} ^wp-admin.*
Rewritecond%{request_filename} ^wp-include.*
Rewritecond%{request_filename}!-f
Rewritecond%{request_filename}!-d
rewriterule/post/tag/(. *)/index.php\?tag=$1
rewriterule/tag/(. *)/index.php?tag=$1
Rewriterule/(Contact|about-copyright|favor|archives|tags|sitemap)/index.php?pagename=$1
rewriterule/post/category/(. *)/(Feed|rdf|rss|rss2|atom)/?$/wp-feed.php?category_name=$1&feed=$2
rewriterule/post/category/? (. *)/index.php?category_name=$1
rewriterule/author/(. *)/(Feed|rdf|rss|rss2|atom)/?$/wp-feed.php?author_name=$1&feed=$2
Rewriterule/author/? (. *)/index.php?author_name=$1
Rewriterule/rss.xml/wp-feed.php?feed=rss2
rewriterule/feed/?$/wp-feed.php?feed=rss2
rewriterule/comments/feed/?$/wp-feed.php?feed=comments-rss2
<ol>
<li>rewriterule/([0-9]+)/? ([0-9]+)?/?$/index.php?p=$1&page=$2</li>
<li>rewriterule/post/([0-9]+)/? ([0-9]+)?/?$/index.php?p=$1&page=$2</li>
</ol>

rewriterule/post/([0-9]+). html/index.php?p=$1
rewriterule/page/(. *)/?s= (. *)/index.php?s=$2&paged=$1
rewriterule/page/(. *)/index.php?paged=$1
rewriterule/post/date/([0-9]{4}) ([0-9]{1,2}) ([0-9]{1,2})/([^/]+)/? ([0-9]+)?/?$/index.php?year=$1&monthnum=$2&day=$3&name=$4&page=$5
rewriterule/post/date/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$/index.php?year=$1&monthnum=$2&day=$3 &page=$4
rewriterule/post/date/([0-9]{4})/([0-9]{1,2})/?$/index.php?year=$1&monthnum=$2&page=$3
rewriterule/post/([0-9]+). html/(Feed|rdf|rss|rss2|atom)/index.php?feed=rss2&p=$1
rewriterule/post/([0-9]+). html/trackback/wp-trackback.php?p=$1

Source: ivup.cn

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.