今天分享下科迅手机站伪静态规则写法,本文是简化后的伪静态规则,企业站用此规则即可,可确保栏目内容页正常访问。
下面分享两大类常用伪静态规则写法:
第一类伪静态规则写法:
#3G模型通用
RewriteRule /3g/thread\-(\d+)\-(\d+)\.html /3g/show\.asp\?d=$1&m=$2 [N,I]
RewriteRule /3g/thread\-(\d+)\-(\d+)\-(\d+)\.html /3g/show\.asp\?d=$1&m=$2&p=$3 [N,I]
RewriteRule /3g/thread\-(\d+)\-(\d+)\-(\d+)\-(\d+)\.html /3g/show\.asp\?d=$1&m=$2&p=$3&pt=$4 [N,I]
RewriteRule /3g/list\-(\d+)\.html /3g/list\.asp\?id=$1 [N,I]
RewriteRule /3g/list\-(\d+)\-(\d+)\.html /3g/list\.asp\?id=$1&page=$2 [N,I]
#模型通用
RewriteRule /thread\-(\d+)\-(\d+)\.html /item/show\.asp\?d=$1&m=$2 [N,I]
RewriteRule /thread\-(\d+)\-(\d+)\-(\d+)\.html /item/show\.asp\?d=$1&m=$2&p=$3 [N,I]
RewriteRule /thread\-(\d+)\-(\d+)\-(\d+)\-(\d+)\.html /item/show\.asp\?d=$1&m=$2&p=$3&pt=$4 [N,I]
RewriteRule /list\-(\d+)\.html /item/list\.asp\?id=$1 [N,I]
RewriteRule /list\-(\d+)\-(\d+)\.html /item/list\.asp\?id=$1&page=$2 [N,I]
第二类伪静态规则写法:
<rule name="Tongyong_m_list1">
<match url="3g/list-([0-9]+).Html$" />
<action type="Rewrite" url="3g/list.asp?id={R:1}" />
</rule>
<rule name="Tongyong_m_list2">
<match url="3g/list-([0-9]+)-([0-9]+).Html$" />
<action type="Rewrite" url="3g/list.asp?id={R:1}&page={R:2}" />
</rule>
<rule name="Tongyong_m_show1">
<match url="3g/thread-([0-9]+)-([0-9]+).html$" />
<action type="Rewrite" url="3g/show.asp?d={R:1}&m={R:2}" />
</rule>
<rule name="Tongyong_m_show2">
<match url="3g/thread-([0-9]+)-([0-9]+)-([0-9]+).html$" />
<action type="Rewrite" url="3g/show.asp?d={R:1}&m={R:2}&m={R:3}" />
</rule>
<rule name="Tongyong_m_show3">
<match url="3g/thread-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+).html$" />
<action type="Rewrite" url="3g/show.asp?d={R:1}&m={R:2}&m={R:3}&m={R:4}" />
</rule>
<rule name="Tongyong_list1">
<match url="list-([0-9]+).Html$" />
<action type="Rewrite" url="Item/list.asp?id={R:1}" />
</rule>
<rule name="Tongyong_list2">
<match url="list-([0-9]+)-([0-9]+).Html$" />
<action type="Rewrite" url="Item/list.asp?id={R:1}&page={R:2}" />
</rule>
<rule name="Tongyong_show1">
<match url="thread-([0-9]+)-([0-9]+).html$" />
<action type="Rewrite" url="item/show.asp?d={R:1}&m={R:2}" />
</rule>
<rule name="Tongyong_show2">
<match url="thread-([0-9]+)-([0-9]+)-([0-9]+).html$" />
<action type="Rewrite" url="item/show.asp?d={R:1}&m={R:2}&p={R:3}" />
</rule>
<rule name="Tongyong_show3">
<match url="thread-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+).html$" />
<action type="Rewrite" url="item/show.asp?d={R:1}&m={R:2}&p={R:3}&pt={R:4}" />
</rule>