web.config伪静态规则配置一例
<?xml version="1.0" encoding="UTF-8"?><configuration> <system.webServer> <rewrite> <rules> <rule name="Redirect" stopProcessing="true"> <match url=".*" /> <conditions> <add input="{HTTP_HOST}" pattern="^xiaojudeng.com$" /> </conditions> <action type="Redirect" url="http://www.xiaojudeng.com/{R:0}" redirectType="Permanent" /> </rule><rule name="Redirect1" stopProcessing="true"> <match url=".*" /> <conditions> <add input="{HTTP_HOST}" pattern="^hgn11206.chinaw3.com$" /> </conditions> <action type="Redirect" url="http://www.xiaojudeng.com/{R:0}" redirectType="Permanent" /> </rule> <rule name="rule1" stopProcessing="true"> <match url="^tags/(.*)" /> <action type="Rewrite" url="tag.php?tag={R:1}" /> </rule><rule name="rule2" stopProcessing="true"> <match url="^tags.html" /> <action type="Rewrite" url="tags.php" /> </rule><rule name="rule3" stopProcessing="true"> <match url="^index.html" /> <action type="Rewrite" url="index.php" /> </rule><rule name="rule7" stopProcessing="true"> <match url="^ask/solve-?(.*)" /> <action type="Rewrite" url="ask/browse.php?action=solve&page={R:1}" /> </rule><rule name="rule88" stopProcessing="true"> <match url="^zhuanjia/([0-9]+).html" /> <action type="Rewrite" url="space/?userid={R:1}" /> </rule><rule name="rule5" stopProcessing="true"> <match url="^ask/([0-9]+).html" /> <action type="Rewrite" url="ask/show.php?id={R:1}" /> </rule><rule name="rule6" stopProcessing="true"> <match url="^about/zhuanjia/.*" /> <action type="Rewrite" url="member/list.php?modelid=17" /> </rule><rule name="rule93" stopProcessing="true"> <match url="^zhuanjia/" /> <action type="Rewrite" url="member/list.php?modelid=17" /> </rule><rule name="rule94" stopProcessing="true"> <match url="^plus/.*" /> <action type="Rewrite" url="list.php?catid=100" /> </rule><rule name="rule95" stopProcessing="true"> <match url="^gongyi/?$" /> <action type="Rewrite" url="list.php?catid=56" /> </rule><rule name="rule96" stopProcessing="true"> <match url="^gongyi/fanqishi/.*" /> <action type="Rewrite" url="list.php?catid=61" /> </rule><rule name="rule97" stopProcessing="true"> <match url="^gongyi/weiquan/.*" /> <action type="Rewrite" url="list.php?catid=62" /> </rule><rule name="rule98" stopProcessing="true"> <match url="^gongyi/boji/.*" /> <action type="Rewrite" url="list.php?catid=63" /> </rule><rule name="rule99" stopProcessing="true"> <match url="^gongyi/jiaguanggao/.*" /> <action type="Rewrite" url="list.php?catid=64" /> </rule><rule name="rule100" stopProcessing="true"> <match url="^gongyi/woyuan/.*" /> <action type="Rewrite" url="list.php?catid=65" /> </rule><rule name="rule101" stopProcessing="true"> <match url="^gongyi/manhua/.*" /> <action type="Rewrite" url="list.php?catid=66" /> </rule><rule name="rule102" stopProcessing="true"> <match url="^(.*)/tags/(.*)" /> <action type="Rewrite" url="tag.php?tag={R:2}" /> </rule><rule name="rule103" stopProcessing="true"> <match url="^(.*)/zhinan/menzhen/menzhen-guahao-57.html" /> <action type="Rewrite" url="show.php?contentid=57" /> </rule><rule name="rule104" stopProcessing="true"> <match url="^show/[a-z-]*([0-9]+).html" /> <action type="Rewrite" url="show.php?contentid={R:1}" /> </rule><rule name="rule105" stopProcessing="true"> <match url="^dianxingbingli/[a-z-]*([0-9]+).html" /> <action type="Rewrite" url="show.php?contentid={R:1}" /> </rule><rule name="rule106" stopProcessing="true"> <match url="^dianxingbingli/?$" /> <action type="Rewrite" url="list.php?catid=99" /> </rule><!--Please do not modify the code above!--><rule name="rule15" stopProcessing="true"> <match url="^ask/ganyinghua-?(.*)" /> <action type="Rewrite" url="ask/list.php?catid=36&page={R:1}" /> </rule><rule name="rule16" stopProcessing="true"> <match url="^ask/zhifanggan-?(.*)" /> <action type="Rewrite" url="ask/list.php?catid=37&page={R:1}" /> </rule><rule name="rule17" stopProcessing="true"> <match url="^ask/dasanyang-?(.*)" /> <action type="Rewrite" url="ask/list.php?catid=38&page={R:1}" /> </rule><rule name="rule18" stopProcessing="true"> <match url="^ask/xiaosanyang-?(.*)" /> <action type="Rewrite" url="ask/list.php?catid=39&page={R:1}" /> </rule><rule name="rule19" stopProcessing="true"> <match url="^ask/xiedaizhe-?(.*)" /> <action type="Rewrite" url="ask/list.php?catid=40&page={R:1}" /> </rule><rule name="rule20" stopProcessing="true"> <match url="^ask/ganai-?(.*)" /> <action type="Rewrite" url="ask/list.php?catid=41&page={R:1}" /> </rule><rule name="rule21" stopProcessing="true"> <match url="^ask/ganfushui-?(.*)" /> <action type="Rewrite" url="ask/list.php?catid=42&page={R:1}" /> </rule><rule name="rule22" stopProcessing="true"> <match url="^ask/gannangzhong-?(.*)" /> <action type="Rewrite" url="ask/list.php?catid=43&page={R:1}" /> </rule><rule name="rule23" stopProcessing="true"> <match url="^ask/binggan-?(.*)" /> <action type="Rewrite" url="ask/list.php?catid=44&page={R:1}" /> </rule><rule name="rule24" stopProcessing="true"> <match url="^ask/jiagan-?(.*)" /> <action type="Rewrite" url="ask/list.php?catid=45&page={R:1}" /> </rule><rule name="rule25" stopProcessing="true"> <match url="^ask/xianweihua-?(.*)" /> <action type="Rewrite" url="ask/list.php?catid=46&page={R:1}" /> </rule><rule name="rule26" stopProcessing="true"> <match url="^ask/gannongzhong-?(.*)" /> <action type="Rewrite" url="ask/list.php?catid=47&page={R:1}" /> </rule><rule name="rule27" stopProcessing="true"> <match url="^ask/huagndanxingganyan-?(.*)" /> <action type="Rewrite" url="ask/list.php?catid=48&page={R:1}" /> </rule><rule name="rule28" stopProcessing="true"> <match url="^ask/jiujinggan-?(.*)" /> <action type="Rewrite" url="ask/list.php?catid=49&page={R:1}" /> </rule><rule name="rule29" stopProcessing="true"> <match url="^ask/huagndanganyan-?(.*)" /> <action type="Rewrite" url="ask/list.php?catid=50&page={R:1}" /> </rule><rule name="rule30" stopProcessing="true"> <match url="^ask/qita-?(.*)" /> <action type="Rewrite" url="ask/list.php?catid=51&page={R:1}" /> </rule><!--end--> </rules> </rewrite> </system.webServer> </configuration>