vps使用过程中各种技术记录,避免自己忘记的同时,希望也能帮助到需要的朋友。 | 登陆

ecshop在lighttpd下的伪静态规则

去年计划做的电子商城所用到的rewrite规则,但后来因为谈判破裂而导致电子商城没有做成,rewrite规则贴出来记录一下。

 

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

Tags: ecshop, lighttpd, 伪静态

« 上一篇 | 下一篇 »

Trackbacks

点击获得Trackback地址,Encode: UTF-8

发表评论

评论内容 (必填):