lighttpd 的ecshop伪静态规则 [申请加精]

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

在论坛较了大半天,网上转了大半天也没有。
于是花了半小时,手写,加测试,加修正。
写好后就立马分享上来,因为看到论坛很多人在找,版主加个精吧。

此代码我特意加了个二级目录。
你如果是把ecshop代码放在根目录,则用记事本 搜索 /soarb 换成空白。
同理,可以把/soarb 换成你相应的二级目录名。


  1. url.rewrite = (
  2. "^/soarb/index.html$" => "/soarb/index.php",
  3. "^/soarb/category$" => "/soarb/index.php",
  4. "^/soarb/feed-c([0-9]+).xml$" => "/soarb/feed.php?cat=$1",
  5. "^/soarb/feed-b([0-9]+).xml$" => "/soarb/feed.php?brand=$1",
  6. "^/soarb/feed-type([^-]+).xml$" => "/soarb/feed.php?type=$1",
  7. "^/soarb/feed.xml$" => "/soarb/feed.php",
  8. "^/soarb/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html$" => "/soarb/category.php?id=$1&brand=$2&price_min=$3&price_max=$4&filter_attr=$5&page=$6&sort=$7&order=$8",
  9. "^/soarb/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)(.*).html$" => "/soarb/category.php?id=$1&brand=$2&price_min=$3&price_max=$4&filter_attr=$5",
  10. "^/soarb/category-([0-9]+)-b([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html$" => "/soarb/category.php?id=$1&brand=$2&page=$3&sort=$4&order=$5",
  11. "^/soarb/category-([0-9]+)-b([0-9]+)-([0-9]+)(.*).html$" => "/soarb/category.php?id=$1&brand=$2&page=$3",
  12. "^/soarb/category-([0-9]+)-b([0-9]+)(.*).html$" => "/soarb/category.php?id=$1&brand=$2",
  13. "^/soarb/category-([0-9]+)(.*).html$" => "/soarb/category.php?id=$1",
  14. "^/soarb/goods-([0-9]+)(.*).html$" => "/soarb/goods.php?id=$1",
  15. "^/soarb/article_cat-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html$" => "/soarb/article_cat.php?id=$1&page=$2&sort=$3&order=$4",
  16. "^/soarb/article_cat-([0-9]+)-([0-9]+)(.*).html$" => "/soarb/article_cat.php?id=$1&page=$2",
  17. "^/soarb/article_cat-([0-9]+)(.*).html$" => "/soarb/article_cat.php?id=$1",
  18. "^/soarb/article-([0-9]+)(.*).html$" => "/soarb/article.php?id=$1",
  19. "^/soarb/brand-([0-9]+)-c([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+).html$" => "/soarb/brand.php?id=$1&cat=$2&page=$3&sort=$4&order=$5",
  20. "^/soarb/brand-([0-9]+)-c([0-9]+)-([0-9]+)(.*).html$" => "/soarb/brand.php?id=$1&cat=$2&page=$3",
  21. "^/soarb/brand-([0-9]+)-c([0-9]+)(.*).html$" => "/soarb/brand.php?id=$1&cat=$2",
  22. "^/soarb/brand-([0-9]+)(.*).html$" => "/soarb/brand.php?id=$1",
  23. "^/soarb/tag-(.*).html$" => "/soarb/search.php?keywords=$1",
  24. "^/soarb/snatch-([0-9]+).html$" => "/soarb/snatch.php?id=$1",
  25. "^/soarb/group_buy-([0-9]+).html$" => "/soarb/group_buy.php?act=view&id=$1",
  26. "^/soarb/auction-([0-9]+).html$" => "/soarb/auction.php?act=view&id=$1",
  27. "^/soarb/exchange-id([0-9]+)(.*).html$" => "/soarb/exchange.php?id=$1&act=view",
  28. "^/soarb/exchange-([0-9]+)-min([0-9]+)-max([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html$" => "/soarb/exchange.php?cat_id=$1&integral_min=$2&integral_max=$3&page=$4&sort=$5&order=$6",
  29. "^/soarb/exchange-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html$" => "/soarb/exchange.php?cat_id=$1&page=$2&sort=$3&order=$4",
  30. "^/soarb/exchange-([0-9]+)-([0-9]+)(.*).html$" => "/soarb/exchange.php?cat_id=$1&page=$2",
  31. "^/soarb/exchange-([0-9]+)(.*).html$" => "/soarb/exchange.php?cat_id=$1"
  32. )
复制代码

回答:
没有演示看看吗?

这也要演示?

伪静态出来和别人的一样呀.

我怕别人说我广告就没放上来

4# soarb
应大众要求,你就发次小广告吧~已经加精了哦

hehe 老大都说了,你就发个广告怕啥

老大允许了,请AD

不错的分享,版主发话了,楼主可以放心放演示出来了

详细演示,IIS伪静态复杂重写演示:

http://www.mestore.cn



貌似不可用。。。
http://bbs.ecshop.com/thread-167922-1-1.html
这里经测试,可用

顶·~~~支持共享

soarb
应大众要求,你就发次小广告吧~已经加精了哦
晓天 发表于 2009-10-19 10:20


这位楼主不在,只好请教下管理员,这个帖子里的伪静态规则适用于我apache+linux的环境吗,我的ecshop是2.7.3版本,谢谢!

很好的东西啊。。。

soarb
应大众要求,你就发次小广告吧~已经加精了哦
晓天 发表于 2009-10-19 10:20



官方怎么不出一个教程呢。