预览模式: 普通 | 列表

在虚拟主机中配置web.config

XML/HTML代码
  1. <?xml version="1.0" encoding="UTF-8"?>  
  2. <configuration>  
  3.     <system.webServer>  
  4.         <rewrite>  
  5.             <rules>  
  6.                 <rule name="1">  
  7.                     <match url="([a-zA-Z_]{1,})-([a-zA-Z_]{1,})\.html$" ignoreCase="false" />  
  8.                     <action type="Rewrite" url="index.php?_m={R:1}&_a={R:2}" appendQueryString="false" />  
  9.                 </rule>  
  10.                 <rule name="2">  
  11.                     <match url="([a-zA-Z_]{1,})-([a-zA-Z_]{1,})-([a-zA-Z_]{1,})-([0-9]{1,})\.html$" ignoreCase="false" />  
  12.                     <action type="Rewrite" url="index.php?_m={R:1}&_a={R:2}&{R:3}={R:4}" appendQueryString="false" />  
  13.                 </rule>  
  14.                 <rule name="3">  
  15.                     <match url="([a-zA-Z_]{1,})-([a-zA-Z_]{1,})-([a-zA-Z_]{1,})-([0-9]{1,})-([a-zA-Z_]{1,})-([0-9]{1,})\.html$" ignoreCase="false" />  
  16.                     <action type="Rewrite" url="index.php?_m={R:1}&_a={R:2}&{R:3}={R:4}&{R:5}={R:6}" appendQueryString="false" />  
  17.                 </rule>  
  18.                 <rule name="4">  
  19.                     <match url="([a-zA-Z_]{1,})-([a-zA-Z_]{1,})-([a-zA-Z_]{1,})-([0-9]{1,})-([a-zA-Z_]{1,})-([0-9]{0,})-([a-zA-Z_]{1,})-([0-9]{0,})\.html$" ignoreCase="false" />  
  20.                     <action type="Rewrite" url="index.php?_m={R:1}&_a={R:2}&{R:3}={R:4}&{R:5}={R:6}&{R:7}={R:8}" appendQueryString="false" />  
  21.                 </rule>  
  22.                 <rule name="5">  
  23.                     <match url="admin/([a-zA-Z_]{1,})-([a-zA-Z_]{1,})-([a-zA-Z_]{1,})-([0-9]{1,})-([a-zA-Z_]{1,})-([0-9]{0,})\.html$" ignoreCase="false" />  
  24.                     <action type="Rewrite" url="admin/index.php?_m={R:1}&_a={R:2}&{R:3}={R:4}&{R:5}={R:6}" appendQueryString="false" />  
  25.                 </rule>  
  26.                 <rule name="6">  
  27.                     <match url="admin/([a-zA-Z_]{1,})-([a-zA-Z_]{1,})\.html$" ignoreCase="false" />  
  28.                     <action type="Rewrite" url="admin/index.php?_m={R:1}&_a={R:2}" appendQueryString="false" />  
  29.                 </rule>  
  30.                 <rule name="7">  
  31.                     <match url="admin/([a-zA-Z_]{1,})-([a-zA-Z_]{1,})-([a-zA-Z_]{1,})-([0-9]{1,})\.html$" ignoreCase="false" />  
  32.                     <action type="Rewrite" url="admin/index.php?_m={R:1}&_a={R:2}&{R:3}={R:4}" appendQueryString="false" />  
  33.                 </rule>  
  34.                 <rule name="8">  
  35.                     <match url="admin/([a-zA-Z_]{1,})-([a-zA-Z_]{1,})-([a-zA-Z_]{1,})-([0-9]{1,})-([a-zA-Z_]{1,})-([0-9]{1,})-([a-zA-Z_]{1,})-([0-9]{0,})\.html$" ignoreCase="false" />  
  36.                     <action type="Rewrite" url="admin/index.php?_m={R:1}&_a={R:2}&{R:3}={R:4}&{R:5}={R:6}&{R:7}={R:8}" appendQueryString="false" />  
  37.                 </rule>  
  38.             </rules>  
  39.         </rewrite>  
  40.     </system.webServer>  
  41. </configuration>  

 

分类:DOS | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 19