smartweb 发表于 2019-11-9 09:04:36

lnmp的ecmall伪静态

发现没有,我补充一下在用的。

if (!-e $request_filename)
{


#商品详情
rewrite ^/goods/(+)/?$ /index.php?app=goods&id=$1last;
rewrite ^/goods/(+)/([^/]+)/?$ /index.php?app=goods&id=$1&act=$2last;
rewrite ^/goods/(+)/([^/]+)/page_([^/]+)/?$ /index.php?app=goods&id=$1&act=$2&page=$3last;
rewrite ^/groupbuy/(+)/?$ /index.php?app=groupbuy&id=$1last;

#分类
rewrite ^/category/goods/?$ /index.php?app=categorylast;
rewrite ^/category/(.*)/?$ /index.php?app=category&act=$1last;
#品牌
rewrite ^/brand/?$ /index.php?app=brandlast;
#文章
rewrite ^/article/(+).html$ /index.php?app=article&act=view&article_id=$1last;
#店铺页面
rewrite ^/store/(+)/?$ /index.php?app=store&id=$1last;
rewrite ^/store/article/(+).html$ /index.php?app=store&act=article&id=$1last;
rewrite ^/store/(+)/credit/?$ /index.php?app=store&id=$1&act=creditlast;
rewrite ^/store/(+)/credit/page_([^/]+)/?$ /index.php?app=store&id=$1&act=credit&page=$2last;
rewrite ^/store/(+)/credit/(+)/?$ /index.php?app=store&id=$1&act=credit&eval=$2last;
rewrite ^/store/(+)/credit/(+)/page_([^/]+)/?$ /index.php?app=store&id=$1&act=credit&eval=$2&page=$3last;
rewrite ^/store/(+)/goods/?$ /index.php?app=store&id=$1&act=searchlast;
rewrite ^/store/(+)/goods/page_([^/]+)/?$ /index.php?app=store&id=$1&act=search&page=$2last;
rewrite ^/store/(+)/category/(+)/?$ /index.php?app=store&id=$1&act=search&cate_id=$2last;
rewrite ^/store/(+)/category/(+)/page_([^/]+)/?$ /index.php?app=store&id=$1&act=search&cate_id=$2&page=$3last;
rewrite ^/store/(+)/groupbuy/?$ /index.php?app=store&id=$1&act=groupbuylast;
rewrite ^/store/(+)/groupbuy/page_([^/]+)/?$ /index.php?app=store&id=$1&act=groupbuy&page=$2last;

}

smartweb 发表于 2019-11-9 09:21:44

更正,后面多了last

if (!-e $request_filename)
{


#商品详情
rewrite ^/goods/(+)/?$ /index.php?app=goods&id=$1;

rewrite ^/goods/(+)/([^/]+)/?$ /index.php?app=goods&id=$1&act=$2;
rewrite ^/goods/(+)/([^/]+)/page_([^/]+)/?$ /index.php?app=goods&id=$1&act=$2&page=$3;
rewrite ^/groupbuy/(+)/?$ /index.php?app=groupbuy&id=$1;

#分类
rewrite ^/category/goods/?$ /index.php?app=category;
rewrite ^/category/(.*)/?$ /index.php?app=category&act=$1;
#品牌
rewrite ^/brand/?$ /index.php?app=brand;
#文章
rewrite ^/article/(+).html$ /index.php?app=article&act=view&article_id=$1;
#店铺页面
rewrite ^/store/(+)/?$ /index.php?app=store&id=$1;
rewrite ^/store/article/(+).html$ /index.php?app=store&act=article&id=$1;
rewrite ^/store/(+)/credit/?$ /index.php?app=store&id=$1&act=credit;
rewrite ^/store/(+)/credit/page_([^/]+)/?$ /index.php?app=store&id=$1&act=credit&page=$2;
rewrite ^/store/(+)/credit/(+)/?$ /index.php?app=store&id=$1&act=credit&eval=$2;
rewrite ^/store/(+)/credit/(+)/page_([^/]+)/?$ /index.php?app=store&id=$1&act=credit&eval=$2&page=$3;
rewrite ^/store/(+)/goods/?$ /index.php?app=store&id=$1&act=search;
rewrite ^/store/(+)/goods/page_([^/]+)/?$ /index.php?app=store&id=$1&act=search&page=$2;
rewrite ^/store/(+)/category/(+)/?$ /index.php?app=store&id=$1&act=search&cate_id=$2;
rewrite ^/store/(+)/category/(+)/page_([^/]+)/?$ /index.php?app=store&id=$1&act=search&cate_id=$2&page=$3;
rewrite ^/store/(+)/groupbuy/?$ /index.php?app=store&id=$1&act=groupbuy;
rewrite ^/store/(+)/groupbuy/page_([^/]+)/?$ /index.php?app=store&id=$1&act=groupbuy&page=$2;

}
页: [1]
查看完整版本: lnmp的ecmall伪静态