升级之后,我的URL REWRITE就有问题,总跑到首页

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

我的网站一打开 URLREWRITE后点击任何连接都会自动跳到网站首页,这是怎么回事啊?我在REWRITE里配置好了规则,可还是不行,怎么回事啊?

回答:
给出地址来看

因为不能用,我暂时关了EC的URLREWRITE功能了。就是一打开后,只要点任何URLWRETE后的连接都自动跳到商城首页,怎么办?

http://bbs.ecshop.com/thread-95341-1-1.html
26
看重写方法是否正确

正确的啊,我是COPY上面的过去的。而且升级之前一直没动过,之后也没动过,突然就不行了。

呵呵。。。。。。。。。。。

把地址发出来我们看一下吧

http://shop.bandari.net/
啥错也不报,你能看出问题吗??

有结果吗?

顶顶更健康。。。。

贴下 空间上的重写规则



这是我空间上的所有规定,包括DZ和DZX的。看看吧。。。
  1. [ISAPI_Rewrite]

  2. # 3600 = 1 hour
  3. CacheClockRate 3600

  4. RepeatLimit 32

  5. # Protect httpd.ini and httpd.parse.errors files

  6. # DZX版的REWRITE

  7. RewriteRule ^(.*)/topic-(.+)\.html\?*(.*)$ $1/portal\.php\?mod=topic&topic=$2&$3
  8. RewriteRule ^(.*)/article-([0-9]+)\.html\?*(.*)$ $1/portal\.php\?mod=article&articleid=$2&$3
  9. RewriteRule ^(.*)/forum-(\w+)-([0-9]+)\.html\?*(.*)$ $1/forum\.php\?mod=forumdisplay&fid=$2&page=$3&$4
  10. RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/forum\.php\?mod=viewthread&tid=$2&extra=page\%3D$4&page=$3&$5
  11. RewriteRule ^(.*)/group-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/forum\.php\?mod=group&fid=$2&page=$3&$4
  12. RewriteRule ^(.*)/space-(username|uid)-(.+)\.html\?*(.*)$ $1/home\.php\?mod=space&$2=$3&$4
  13. RewriteRule ^(.*)/([a-z]+)-(.+)\.html\?*(.*)$ $1/$2\.php\?rewrite=$3&$4


  14. #DZ老版本的REWRITE

  15. RewriteRule ^(.*)/archiver/((fid|tid)-[w-]+.html)?*(.*)$ $1/archiver/index.php?$2&$4
  16. RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+).html?*(.*)$ $1/forumdisplay.php?fid=$2&page=$3&$4
  17. RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+).html?*(.*)$ $1/viewthread.php?tid=$2&extra=page%3D$4&page=$3&$4
  18. RewriteRule ^(.*)/space-(username|uid)-(.+).html?*(.*)$ $1/space.php?$2=$3&$4
  19. RewriteRule ^(.*)/tag-(.+).html?*(.*)$ $1/tag.php?name=$2&$3

  20. RewriteRule ^(.*)/music.htm$ $1/music\.php [I]

  21. #ECSHOP的REWRITE

  22. RewriteRule ^(.*)/index.html$ $1/index\.php [I]
  23. RewriteRule ^(.*)/category$ $1/index\.php [I]
  24. RewriteRule ^(.*)/feed-c([0-9]+).xml$ $1/feed\.php\?cat=$2 [I]
  25. RewriteRule ^(.*)/feed-b([0-9]+).xml$ $1/feed\.php\?brand=$2 [I]
  26. RewriteRule ^(.*)/feed-type([^-]+)\.xml$ $1/feed\.php\?type=$2 [I]
  27. RewriteRule ^(.*)/feed.xml$ $1/feed\.php [I]
  28. 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]
  29. 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]
  30. 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]
  31. RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)-([0-9]+)(.*)\.html$ $1/category\.php\?id=$2&brand=$3&page=$4 [I]
  32. RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)(.*)\.html$ $1/category\.php\?id=$2&brand=$3 [I]
  33. RewriteRule ^(.*)/category-([0-9]+)(.*)\.html$ $1/category\.php\?id=$2 [I]

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

  35. RewriteRule ^(.*)/goods-([0-9]+)(.*)\.html$ $1/goods\.php\?id=$2 [I]
  36. RewriteRule ^(.*)/article_cat-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$ $1/article_cat\.php\?id=$2&page=$3&sort=$4&order=$5 [I]
  37. RewriteRule ^(.*)/article_cat-([0-9]+)-([0-9]+)-(.+)(.*)\.html$ $1/article_cat\.php\?id=$1&page=$2&keywords=$3 [I]
  38. RewriteRule ^(.*)/article_cat-([0-9]+)-([0-9]+)(.*)\.html$ $1/article_cat\.php\?id=$2&page=$3 [I]
  39. RewriteRule ^(.*)/article_cat-([0-9]+)(.*)\.html$ $1/article_cat\.php\?id=$2 [I]
  40. RewriteRule ^(.*)/article-([0-9]+)(.*)\.html$ $1/article\.php\?id=$2 [I]
  41. RewriteRule ^(.*)/brand-([0-9]+)-c([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)\.html $1/brand\.php\?id=$2&cat=$3&page=$4&sort=$5&order=$6 [I]
  42. RewriteRule ^(.*)/brand-([0-9]+)-c([0-9]+)-([0-9]+)(.*)\.html $1/brand\.php\?id=$2&cat=$3&page=$4 [I]

  43. RewriteRule ^(.*)/brand-([0-9]+)-c([0-9]+)\.html(.*)$ $1/brand\.php\?$4&id=$2&cat=$3 [I]

  44. RewriteRule ^(.*)/brand-([0-9]+)-c([0-9]+)(.*)\.html $1/brand\.php\?id=$2&cat=$3 [I]
  45. RewriteRule ^(.*)/brand-([0-9]+)(.*)\.html $1/brand\.php\?id=$2 [I]
  46. RewriteRule ^(.*)/tag-(.*)\.html $1/search\.php\?keywords=$2 [I]
  47. RewriteRule ^(.*)/snatch-([0-9]+)\.html$ $1/snatch\.php\?id=$2 [I]
  48. RewriteRule ^(.*)/group_buy-([0-9]+)\.html$ $1/group_buy\.php\?act=view&id=$2 [I]
  49. RewriteRule ^(.*)/auction-([0-9]+)\.html$ $1/auction\.php\?act=view&id=$2 [I]
  50. RewriteRule ^(.*)/exchange-id([0-9]+)(.*)\.html$ $1/exchange\.php\?id=$2&act=view [I]
  51. RewriteRule ^(.*)/exchange-([0-9]+)-min([0-9]+)-max([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$ $1/exchange\.php\?cat_id=$2&integral_min=$3&integral_max=$4&page=$5&sort=$6&order=$7 [I]
  52. RewriteRule ^(.*)/exchange-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$ $1/exchange\.php\?cat_id=$2&page=$3&sort=$4&order=$5 [I]
  53. RewriteRule ^(.*)/exchange-([0-9]+)-([0-9]+)(.*)\.html$ $1/exchange\.php\?cat_id=$2&page=$3 [I]
  54. RewriteRule ^(.*)/exchange-([0-9]+)(.*)\.html$ $1/exchange\.php\?cat_id=$2 [I]
复制代码

建议

# 为了确保重写规则不影响服务器上的其他站点
# 请将下面的语句前的#号去掉,并将(?:www\.)?site1\.com改为商店所在域名

#RewriteCond %{HTTP:Host} (?:www\.)?site1\.com

可以避免影响到其他站点

我以前没加都正常,再说,我加上了等于没加,一点效果也没有。。。

贴下 dz的网站和 ec的网站看下