网站伪静态问题.

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

网站现在用的规则之前在服务器上用是可以的.现在换成了虚拟主机..现在发现分类页无法翻页..实在解决不了..
现在求助一下大家..

麻烦大家帮我看一下..网站是www.shuiyishop.com

不能分页的http://www.shuiyishop.com/category-47-b0-min0-max0-attr0-2-goods_id-DESC.html

不清楚是哪里出错了..

现在规则贴出来.希望懂这个的帮我看一下..如果能解决分页问题.最好.

如果无法解决的话.我想删除分类页面的静态...也就是其它页面还是静态的..只有分类不是静态的.

谢谢~

  1. [ISAPI_Rewrite]
  2. # ECSHOP
  3. #RewriteCond %{HTTP:Host} www.shuiyishop.com

  4. RewriteRule ^(.*)/index.html(\??)(.*)$ $1/index\.php\?$3[I]
  5. RewriteRule ^(.*)/category(\??)(.*)$$1/index\.php\?$3[I]
  6. RewriteRule ^(.*)/feed-c([0-9]+).xml(\??)(.*)$$1/feed\.php\?$4&cat=$2[I]
  7. RewriteRule ^(.*)/feed-b([0-9]+).xml(\??)(.*)$$1/feed\.php\?$4&brand=$2[I]
  8. RewriteRule ^(.*)/feed-type([^-]+)\.xml(\??)(.*)$$1/feed\.php\?$4&type=$2 [I]
  9. RewriteRule ^(.*)/feed.xml(\??)(.*)$$1/feed\.php\?$3[I]

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

  17. RewriteRule ^(.*)/goods-([0-9]+)(.*)\.html(\??)(.*)$$1/goods\.php\?$5&id=$2[I]
  18. RewriteRule ^(.*)/article_cat-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html(\??)(.*)$$1/article_cat\.php\?$8&id=$2&page=$3&sort=$4&order=$5[I]
  19. RewriteRule ^(.*)/article_cat-([0-9]+)-([0-9]+)(.*)\.html(\??)(.*)$$1/article_cat\.php\?$6&id=$2&page=$3 [I]
  20. RewriteRule ^(.*)/article_cat-([0-9]+)(.*)\.html(\??)(.*)$$1/article_cat\.php\?$5&id=$2[I]
  21. RewriteRule ^(.*)/article-([0-9]+)(.*)\.html(\??)(.*)$$1/article\.php\?$5&id=$2 [I]

  22. RewriteRule ^(.*)/brand-([0-9]+)-c([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)\.html(\??)(.*)$$1/brand\.php\?$8&id=$2&cat=$3&page=$4&sort=$5&order=$6 [I]
  23. RewriteRule ^(.*)/brand-([0-9]+)-c([0-9]+)-([0-9]+)(.*)\.html(\??)(.*)$ $1/brand\.php\?$7&id=$2&cat=$3&page=$4[I]
  24. RewriteRule ^(.*)/brand-([0-9]+)-c([0-9]+)\.html(\??)(.*)$$1/brand\.php\?$5&id=$2&cat=$3[I]
  25. RewriteRule ^(.*)/brand-([0-9]+)-c([0-9]+)(.*)\.html(\??)(.*)$ $1/brand\.php\?$6&id=$2&cat=$3[I]
  26. RewriteRule ^(.*)/brand-([0-9]+)(.*)\.html(\??)(.*)$$1/brand\.php\?$5&id=$2[I]
  27. RewriteRule ^(.*)/tag-(.*)\.html(\??)(.*)$$1/search\.php\?$4&keywords=$2[I]

  28. RewriteRule ^(.*)/snatch-([0-9]+)\.html(\??)(.*)$$1/snatch\.php\?$4&id=$2[I]
  29. RewriteRule ^(.*)/group_buy-([0-9]+)\.html(\??)(.*)$$1/group_buy\.php\?$4&act=view&id=$2[I]
  30. RewriteRule ^(.*)/auction-([0-9]+)\.html(\??)(.*)$ $1/auction\.php\?$4&act=view&id=$2 [I]
  31. RewriteRule ^(.*)/exchange-id([0-9]+)(.*)\.html(\??)(.*)$$1/exchange\.php\?$5&id=$2&act=view[I]

  32. RewriteRule ^(.*)/exchange-([0-9]+)-min([0-9]+)-max([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html(\??)(.*)$$1/exchange\.php\?$10&cat_id=$2&integral_min=$3&integral_max=$4&page=$5&sort=$6&order=$7 [I]
  33. RewriteRule ^(.*)/exchange-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html(\??)(.*)$$1/exchange\.php\?$8&cat_id=$2&page=$3&sort=$4&order=$5 [I]
  34. RewriteRule ^(.*)/exchange-([0-9]+)-([0-9]+)(.*)\.html(\??)(.*)$$1/exchange\.php\?$6&cat_id=$2&page=$3[I]
  35. RewriteRule ^(.*)/exchange-([0-9]+)(.*)\.html(\??)(.*)$$1/exchange\.php\?$5&cat_id=$2[I]
复制代码

回答:
谢谢大家了..

麻烦大家会的帮我看一下啊..

如果只是去掉分类页的伪静态,可以这样做,很简单

修改 includes/lib_common.php



case 'category':

后面加一句:

$rewrite=NULL;

别忘了 改完后 去后台清除缓存




如果想要实现全部静态的效果怎么解决呢?

OK了..3Q.

好,顶下

我的站www.51shopw.com
请教如何做静态,上传什么文件,谢谢,我不会写正则!!

www.badukongjian.com
也是的噢.

哈哈,我已经解决了,其实仔细看一下httpd.ini的代码,还是能够看出大概的意思的,左边应该是重定向以后的地址,右边应该是重定向以前的地址,还有category那部分代码应该是物品分类相关的重定向代码,依此类推,稍微懂点英文的一看就明白了.分类页不能翻页,应该是category那部分代码出了问题,下载官方的URLRewrite.txt文件,把category那部分代码全部复制到httpd.ini相应的代码位置,保存上传到根目录.就OK了....实例地址:http://www.hengdiancar.com