[基础优化] Windows+IIS7.5环境的伪静态设置及规则

2016-04-25 12:05:34 晨风 6

服务器信息

  • 操作系统

  • Windows NT 6.1

  • WEB服务器

  • Microsoft-IIS/7.5

  • PHP版本

  • 5.4.7

  • MySQL版本

  • 5.5.19

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="rule1" stopProcessing="true">
<match url="^index-([a-zA-Z0-9_\u4e00-\u9fa5]+).html" />
<action type="Rewrite" url="index.php?lang={R:1}&pseudo_jump=1" />
</rule>
<rule name="rule2" stopProcessing="true">
<match url="^([a-zA-Z0-9_\u4e00-\u9fa5]+)/list-([a-zA-Z0-9_\u4e00-\u9fa5]+)-([a-zA-Z0-9_\u4e00-\u9fa5]+).html" />
<action type="Rewrite" url="{R:1}/index.php?lang={R:3}&metid={R:2}&list=1&pseudo_jump=1" />
</rule>
<rule name="rule3" stopProcessing="true">
<match url="^([a-zA-Z0-9_\u4e00-\u9fa5]+)/list-([a-zA-Z0-9_\u4e00-\u9fa5]+)-([0-9_]+)-([a-zA-Z0-9_\u4e00-\u9fa5]+).html" />
<action type="Rewrite" url="{R:1}/index.php?lang={R:4}&metid={R:2}&list=1&page={R:3}&pseudo_jump=1" />
</rule>
<rule name="rule4" stopProcessing="true">
<match url="^([a-zA-Z0-9_\u4e00-\u9fa5]+)/jobcv-([a-zA-Z0-9_\u4e00-\u9fa5]+)-([a-zA-Z0-9_\u4e00-\u9fa5]+).html" />
<action type="Rewrite" url="{R:1}/cv.php?lang={R:3}&selectedjob={R:2}&pseudo_jump=1" />
</rule>
<rule name="rule5" stopProcessing="true">
<match url="^([a-zA-Z0-9_\u4e00-\u9fa5]+)/product-list-([a-zA-Z0-9_\u4e00-\u9fa5]+).html" />
<action type="Rewrite" url="{R:1}/product.php?lang={R:2}&pseudo_jump=1" />
</rule>
<rule name="rule6" stopProcessing="true">
<match url="^([a-zA-Z0-9_\u4e00-\u9fa5]+)/img-list-([a-zA-Z0-9_\u4e00-\u9fa5]+).html" />
<action type="Rewrite" url="{R:1}/img.php?lang={R:2}&pseudo_jump=1" />
</rule>
<rule name="rule7" stopProcessing="true">
<match url="^([a-zA-Z0-9_\u4e00-\u9fa5]+)/([a-zA-Z0-9_\u4e00-\u9fa5]+)-([a-zA-Z0-9_\u4e00-\u9fa5]+).html" />
<action type="Rewrite" url="{R:1}/index.php?lang={R:3}&metid={R:2}&pseudo_jump=1" />
</rule>
<rule name="rule8" stopProcessing="true">
<match url="^tag/([\s\S]+)-([a-zA-Z0-9_\u4e00-\u9fa5]+)" />
<action type="Rewrite" url="search/search.php?class1=&class2=&class3=&searchtype=0&searchword={R:1}&lang={R:2}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>