修改伪静态规则带来的问题。

2016-07-07 15:02 来源:www.chinab4c.com 作者:ecshop专家

求助。我修改了伪静态规则中的category为其它名称,正常实现了。但这次修改带了个问题,是栏目导航的当前栏目背景改变的效果没有了。

我看了下,主要是 class="cur" 的判断无效,不知要改哪里

回答:
(.*?)匹配就可以了

没有看懂,能不能再详细点。新手,谢谢。

RewriteRule ^(.*)/category$$1/index\.php[I]
RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$$1/category\.php\?id=$2&brand=$3&price_min=$4&price_max=$5&filter_attr=$6&page=$7&sort=$8&order=$9 [I]
RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)\.html$ $1/category\.php\?id=$2&brand=$3&price_min=$4&price_max=$5&filter_attr=$6[I]
RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$$1/category\.php\?id=$2&brand=$3&page=$4&sort=$5&order=$6[I]
RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)-([0-9]+)(.*)\.html$$1/category\.php\?id=$2&brand=$3&page=$4[I]
RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)(.*)\.html$$1/category\.php\?id=$2&brand=$3 [I]
RewriteRule ^(.*)/category-([0-9]+)(.*)\.html$ $1/category\.php\?id=$2[I]
RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)\.html(.*)$$1/category\.php\?$4&id=$2&brand=$3


改为


RewriteRule ^(.*)/shipinpifafenlei$$1/index\.php[I]
RewriteRule ^(.*)/shipinpifafenlei-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$$1/category\.php\?id=$2&brand=$3&price_min=$4&price_max=$5&filter_attr=$6&page=$7&sort=$8&order=$9 [I]
RewriteRule ^(.*)/shipinpifafenlei-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)\.html$ $1/category\.php\?id=$2&brand=$3&price_min=$4&price_max=$5&filter_attr=$6[I]
RewriteRule ^(.*)/shipinpifafenlei-([0-9]+)-b([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$$1/category\.php\?id=$2&brand=$3&page=$4&sort=$5&order=$6[I]
RewriteRule ^(.*)/shipinpifafenlei-([0-9]+)-b([0-9]+)-([0-9]+)(.*)\.html$$1/category\.php\?id=$2&brand=$3&page=$4[I]
RewriteRule ^(.*)/shipinpifafenlei-([0-9]+)-b([0-9]+)(.*)\.html$$1/category\.php\?id=$2&brand=$3 [I]
RewriteRule ^(.*)/shipinpifafenlei-([0-9]+)(.*)\.html$ $1/category\.php\?id=$2[I]

RewriteRule ^(.*)/shipinpifafenlei-([0-9]+)-b([0-9]+)\.html(.*)$$1/category\.php\?$4&id=$2&brand=$3

顶一下,帮帮忙呀 大哥些