当前位置:首页 > CMS教程 > ecshop > 列表

ecshop伪静态.htaccess的规则代码

发布:smiling 来源: PHP粉丝网  添加日期:2014-06-14 13:26:04 浏览: 评论:0 

.htaccess的rewrite代码如下:

  1. RewriteEngine On 
  2. # direct one-word access 
  3. RewriteRule ^index\.html$ index\.php [L] 
  4. RewriteRule ^category$ index\.php [L] 
  5. # access any object by its numeric identifier 
  6. RewriteRule ^feed-c([0-9]+)\.xml$ feed\.php\?cat=$1 [L] 
  7. RewriteRule ^feed-b([0-9]+)\.xml$ feed\.php\?brand=$1 [L] 
  8. RewriteRule ^feed\.xml$ feed\.php [L] 
  9. RewriteRule ^category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$ category\.php\?id=$1&brand=$2&price_min=$3&price_max=$4&filter_attr=$5&page=$6&sort=$7&order=$8 [QSA,L] 
  10. RewriteRule ^category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)(.*)\.html$ category\.php\?id=$1&brand=$2&price_min=$3&price_max=$4&filter_attr=$5 [QSA,L] 
  11. RewriteRule ^category-([0-9]+)-b([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$ category\.php\?id=$1&brand=$2&page=$3&sort=$4&order=$5 [QSA,L] 
  12. RewriteRule ^category-([0-9]+)-b([0-9]+)-([0-9]+)(.*)\.html$ category\.php\?id=$1&brand=$2&page=$3 [QSA,L] 
  13. RewriteRule ^category-([0-9]+)-b([0-9]+)(.*)\.html$ category\.php\?id=$1&brand=$2 [QSA,L] 
  14. RewriteRule ^category-([0-9]+)(.*)\.html$ category\.php\?id=$1 [QSA,L] 
  15. RewriteRule ^goods-([0-9]+)(.*)\.html$ goods\.php\?id=$1 [QSA,L] 
  16. RewriteRule ^article_cat-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$ article_cat\.php\?id=$1&page=$2&sort=$3&order=$4 [QSA,L] 
  17. RewriteRule ^article_cat-([0-9]+)-([0-9]+)(.*)\.html$ article_cat\.php\?id=$1&page=$2 [QSA,L] 
  18. RewriteRule ^article_cat-([0-9]+)(.*)\.html$ article_cat\.php\?id=$1 [QSA,L] 
  19. RewriteRule ^article-([0-9]+)(.*)\.html$ article\.php\?id=$1 [QSA,L] 
  20. RewriteRule ^brand-([0-9]+)-c([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)\.html brand\.php\?id=$1&cat=$2&page=$3&sort=$4&order=$5 [QSA,L] 
  21. RewriteRule ^brand-([0-9]+)-c([0-9]+)-([0-9]+)(.*)\.html brand\.php\?id=$1&cat=$2&page=$3 [QSA,L] 
  22. RewriteRule ^brand-([0-9]+)-c([0-9]+)(.*)\.html brand\.php\?id=$1&cat=$2 [QSA,L] 
  23. RewriteRule ^brand-([0-9]+)(.*)\.html brand\.php\?id=$1 [QSA,L] 
  24. RewriteRule ^tag-(.*)\.html search\.php\?keywords=$1 [QSA,L] 
  25. RewriteRule ^snatch-([0-9]+)\.html$ snatch\.php\?id=$1 [QSA,L] 
  26. RewriteRule ^group_buy-([0-9]+)\.html$ group_buy\.php\?act=view&id=$1 [QSA,L] 
  27. RewriteRule ^auction-([0-9]+)\.html$ auction\.php\?act=view&id=$1 [QSA,L] 
把以上代码放到记事本里,然后上传到你的ecshop空间里的wwwroot根目录下,然后改记事本的名字为:.htaccess,之后你在ecshop商城后台设置一下伪静态.

Tags: ecshop伪静态 htaccess规则

分享到: