URL static can enhance search engine crawl, turn on this function need to add corresponding Rewrite rules to the WEB server, and will increase the server burden slightly. This tutorial explains how to configure the Rewrite rules for individual products in an IIS environment.
URL static can enhance search engine crawl, turn on this function need to add corresponding Rewrite rules to the WEB server, and will increase the server burden slightly. This tutorial explains how to configure the Rewrite rules for individual products in an IIS environment.
The following discuz as an example to explain the IIS environment Configuration rewrite rules, I hope you can extrapolate.
First, download the Rewrite.zip package, extract to any directory on any disk.
Rewrite.zip Download
The Rewrite rules for each product are different, please select the corresponding Rewrite rules for the product download.
discuz!6.0.0/6.1.0 Rewrite rules download address: http://www.discuz.net/attachment.php?aid=195279
Ucenter Home1.0.0 Rewrite rules download address: Http://u.discuz.net/help/down/iisRewrite.rar
Supesite6.0_x-space4.0_uc rewrite rules download address: Http://www.supesite.com/download/iisrewrite.zip
Supev Rewrite rules download address: Http://download.comsenz.com/SupeV/tools/rewrite_iis.zip
Download the Rewrite rules for each product and rename them as shown in the following illustration:
Second, the configuration method
The Rewrite configuration method for discuz!, Uchome, Supesite/x-space, Supev is similar, and the following is an example of discuz!6.0.0/6.1.0 rule configuration method in the context of the rules for configuring Rewrite in IIS environments The
In IIS Manager, select the Web site, right-click the properties, as shown in the following illustration:
Select ISAPI filter in the pop-up window
Click "Add" in the image above, and in the pop-up window "Filter Name" fill "rewrite"
Click "Browse" in the image above, choose to download the discuz! after decompression Rewrite.dll files under the Rewrite rules directory
Click "OK" when you have finished browsing
Add finished click "OK"
Restart IIS
Re-select the site => the "properties" => "ISAPI Filters" and if you see a green arrow with a status up, the Rewrite module is installed successfully.
Rewrite rule configuration was successful, but this time browsing forum address is still not pseudo static, but also need to go to the forum background to do the appropriate settings can.
Forum background => Global => optimization settings, the following image red Region options:
"URL static": As shown in the figure above, there are five options, depending on your requirements, you can choose up to five, the choice is not effective.
Rewrtie Compatibility: If your server does not support Chinese characters in the Rewrite rule, select Yes. For servers that do not have this problem, you can choose No.
The above two settings are complete "submit" save.
This time to return to the Forum home casually open a section or a post can see discuz! The Rewrite pseudo static configuration succeeded!
Third, the Rewrite rules of each product
Httpd.ini file contents are configured as follows
Copy content to Clipboard code:
[Isapi_rewrite] # 3600 = 1 hour cacheclockrate 3600 Repeatlimit # discuz! Rewrite rule # standalone host user # Protect Httpd.ini and Httpd.parse.errors files # from accessing through HTTP rewriterule ^ (. *)/archiv er/((Fidtid)-[\w\-]+\.html) \?* (. *) $ $1/archiver/index\.php\?$2&$4 rewriterule ^ (. *)/forum-([0-9]+)-([0-9]+) \. html\?* (. *) $ $1/forumdisplay\.php\?fid=$2&page=$3&$4 rewriterule ^ (. *)/thread-([0-9]+)-([0-9]+)-([0-9]+) \ . html\?* (. *) $ $1/viewthread\.php\?tid=$2&extra=page\%3d$4&page=$3&$4 rewriterule ^ (. *)/space-( USERNAMEUID)-(. +) \.html\?* (. *) $ $1/space\.php\?$2=$3&$4 rewriterule ^ (. *)/tag-(. +) \.html\?* (. *) $ $1/tag\.php\? name=$2&$3 # supesite Rewrite rule # Independent host User # Modify/supesite in the following statement to your Supesite directory address, if the program is placed in the root directory, please change/supesite to/rewriter Ule ^/supesite/([0-9]+) $/supesite/index\.php\?uid/$1 [L] Rewriterule ^/supesite/([0-9]+)/spacelist (. +) $/supesite/ index\.php\?uid/$1/action/spacelist/type$2 [L] Rewriterule ^/supesite/([0-9]+)/viewspace (. +) $/supesite/index\.php \?uid/$1/action/viewspace/itemid$2 [L] Rewriterule ^/supesite/([0-9]+)/viewbbs (. +) $/supesite/index\.php\?uid/$1/ action/viewbbs/tid$2 [L] rewriterule ^/supesite/([0-9]+)/(. *) $/supesite/index\.php\?uid/$1/$2 [L] RewriteRule ^/ Supesite/action (. +) $/supesite/index\.php\?action$1 [L] Rewriterule ^/supesite/category (. +) $/supesite/index\.php\? action/category/catid$1 [L] rewriterule ^/supesite/viewnews (. +) $/supesite/index\.php\?action/viewnews/itemid$1 [L] Rewriterule ^/supesite/viewthread (. +) $/supesite/index\.php\?action/viewthread/tid$1 [L] RewriteRule ^/supesite/ MyGroup (. +) $/supesite/index\.php\?action/mygroup/gid$1 [L] # uchome Rewrite rule # Independent Host User # Modify the/uchome in the following statement to your Uchome directory Address, if the program is placed in the root directory, modify/uchome to/Rewriterule ^/uchome/(Spacenetwork)-(. +) \.html$/uchome/$1\.php\?rewrite=$2 [L] Rewriterule ^/uchome/(spacenetwork) \.html$/uchome/$1\.php [L] Rewriterule ^/uchome/([0-9]+) $/uchome/space\.php\? uid=$1 [L] # supev rewrite rule # standalone host user Rewriterule ^ (. *)/ivideo (-tv-([0-9]+))? (-ti-([0-9]+))? (-tc-([0-9]+))? (-page-([0-9]+)] \.html$ $1/ivideo\.php\?tv=$3&ti=$5&tc=$7&page=$9 rewriterule ^ (. *)/ispecial (-tv-([ 0-9]+))? (-ti-([0-9]+))? (-tc-([0-9]+))? (-page-([0-9]+)] \.html$ $1/ispecial\.php\?tv=$3&ti=$5&tc=$7&page=$9 rewriterule ^ (. *)/icategory\. html$ $1/icategory\.php rewriterule ^ (. *)/category-cid-([0-9]+) (-tag-([^-]*))? (-timelimit-([0-9]+))? (-orderlimit-([0-9]+))? (-page-([0-9]+))? \.html$ $1/category\.php\?cid=$2&tag=$4&timelimit=$6&orderlimit=$8&page=$10 Rewriterule ^ (. *)/vspace-(Midusername)-(. +) \.html$ $1/vspace\.php\?$2=$3 rewriterule ^ (. *)/video-(Vidivid)-(. +) \. html$ $1/video\.php\?$2=$3 rewriterule ^ (. *)/special-spid-([0-9]+) \.html$ $1/special\.php\?spid=$2
Frequently asked Questions: after the configuration is good, HTTPD. INI configuration is also correct, but still can not open. This may be a rewrite.dll\httpd.ini permission problem, you can try to give the two files to everyone's Read permission.
Related tags: pseudo-static rewrite rules
|
Related information: Pseudo-Static Implementation method: Configure rewrite rules in IIS environment
|