htaccess.txt 1.6 KB

12345678910111213141516171819202122232425
  1. # 将 RewriteEngine 模式打开
  2. RewriteEngine On
  3. # 如果商城程序存放于/33hao下,需将下行更改为 RewriteBase /33hao
  4. RewriteBase /
  5. # apache ,iis 伪静态规则
  6. RewriteRule ^goods-([0-9]+)(-?)([0-9]*).html$ index.php?act=goods&goods_id=$1
  7. RewriteRule ^groupbuy-([0-9]+)-([0-9]+).html$ index.php?act=show_groupbuy&op=groupbuy_detail&group_id=$1&id=$2
  8. RewriteRule ^article-([0-9]+).html$ index.php?act=article&article_id=$1
  9. RewriteRule ^store-([0-9]+).html$ index.php?act=show_store&store_id=$1
  10. RewriteRule ^activity-([0-9]+)-([0-9]*).html$ index.php?act=activity&activity_id=$1&nav_id=$2
  11. RewriteRule ^store_nav-([0-9]+)-([0-9]+).html$ index.php?act=show_store&store_id=$1&article=$2
  12. RewriteRule ^document-([a-zA-Z_]+).html$ index.php?act=document&code=$1
  13. RewriteRule ^coupon_info-([0-9]+)-([0-9]+).html$ index.php?act=coupon_store&op=detail&coupon_id=$1&id=$2
  14. #nginx 伪静态规则
  15. #rewrite ^/goods-([0-9]+)(-?)([0-9]*).html$ /index.php?act=goods&goods_id=$1&id=$2 last;
  16. #rewrite ^/groupbuy-([0-9]+)-([0-9]+).html$ /index.php?act=show_groupbuy&op=groupbuy_detail&group_id=$1&id=$2 last;
  17. #rewrite ^/article-([0-9]+).html$ /index.php?act=article&article_id=$1 last;
  18. #rewrite ^/store-([0-9]+).html$ /index.php?act=show_store&store_id=$1 last;
  19. #rewrite ^/activity-([0-9]+)-([0-9]*).html$ /index.php?act=activity&activity_id=$1&nav_id=$2 last;
  20. #rewrite ^/store_nav-([0-9]+)-([0-9]+).html$ /index.php?act=show_store&store_id=$1&article=$2 last;
  21. #rewrite ^/document-([a-zA-Z_]+).html$ /index.php?act=document&code=$1 last;
  22. #rewrite ^/coupon_info-([0-9]+)-([0-9]+).html$ /index.php?act=coupon_store&op=detail&coupon_id=$1&id=$2 last;