在虚拟主机中配置web.config
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="1">
<match url="([a-zA-Z_]{1,})-([a-zA-Z_]{1,})\.html$" ignoreCase="false" />
<action type="Rewrite" url="index.php?_m={R:1}&_a={R:2}" appendQueryString="false" />
</rule>
<rule name="2">
<match url="([a-zA-Z_]{1,})-([a-zA-Z_]{1,})-([a-zA-Z_]{1,})-([0-9]{1,})\.html$" ignoreCase="false" />
<action type="Rewrite" url="index.php?_m={R:1}&_a={R:2}&{R:3}={R:4}" appendQueryString="false" />
</rule>
<rule name="3">
<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" />
<action type="Rewrite" url="index.php?_m={R:1}&_a={R:2}&{R:3}={R:4}&{R:5}={R:6}" appendQueryString="false" />
</rule>
<rule name="4">
<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" />
<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" />
</rule>
<rule name="5">
<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" />
<action type="Rewrite" url="admin/index.php?_m={R:1}&_a={R:2}&{R:3}={R:4}&{R:5}={R:6}" appendQueryString="false" />
</rule>
<rule name="6">
<match url="admin/([a-zA-Z_]{1,})-([a-zA-Z_]{1,})\.html$" ignoreCase="false" />
<action type="Rewrite" url="admin/index.php?_m={R:1}&_a={R:2}" appendQueryString="false" />
</rule>
<rule name="7">
<match url="admin/([a-zA-Z_]{1,})-([a-zA-Z_]{1,})-([a-zA-Z_]{1,})-([0-9]{1,})\.html$" ignoreCase="false" />
<action type="Rewrite" url="admin/index.php?_m={R:1}&_a={R:2}&{R:3}={R:4}" appendQueryString="false" />
</rule>
<rule name="8">
<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" />
<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" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
评论
鳄鱼皮鞋
回复如何运用到实际东中是关键,主要是自己自会简单的搭建模板。