VPS侦探论坛

 找回密码
 注册
查看: 2544|回复: 1

lnmp的ecmall伪静态

[复制链接]
发表于 2019-11-9 09:04:36 | 显示全部楼层 |阅读模式

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

if (!-e $request_filename)
{


#商品详情
rewrite ^/goods/([0-9]+)/?$ /index.php?app=goods&id=$1last;
rewrite ^/goods/([0-9]+)/([^/]+)/?$ /index.php?app=goods&id=$1&act=$2last;
rewrite ^/goods/([0-9]+)/([^/]+)/page_([^/]+)/?$ /index.php?app=goods&id=$1&act=$2&page=$3last;
rewrite ^/groupbuy/([0-9]+)/?$ /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/([0-9]+).html$ /index.php?app=article&act=view&article_id=$1last;
#店铺页面
rewrite ^/store/([0-9]+)/?$ /index.php?app=store&id=$1last;
rewrite ^/store/article/([0-9]+).html$ /index.php?app=store&act=article&id=$1last;
rewrite ^/store/([0-9]+)/credit/?$ /index.php?app=store&id=$1&act=creditlast;
rewrite ^/store/([0-9]+)/credit/page_([^/]+)/?$ /index.php?app=store&id=$1&act=credit&page=$2last;
rewrite ^/store/([0-9]+)/credit/([0-9]+)/?$ /index.php?app=store&id=$1&act=credit&eval=$2last;
rewrite ^/store/([0-9]+)/credit/([0-9]+)/page_([^/]+)/?$ /index.php?app=store&id=$1&act=credit&eval=$2&page=$3last;
rewrite ^/store/([0-9]+)/goods/?$ /index.php?app=store&id=$1&act=searchlast;
rewrite ^/store/([0-9]+)/goods/page_([^/]+)/?$ /index.php?app=store&id=$1&act=search&page=$2last;
rewrite ^/store/([0-9]+)/category/([0-9]+)/?$ /index.php?app=store&id=$1&act=search&cate_id=$2last;
rewrite ^/store/([0-9]+)/category/([0-9]+)/page_([^/]+)/?$ /index.php?app=store&id=$1&act=search&cate_id=$2&page=$3last;
rewrite ^/store/([0-9]+)/groupbuy/?$ /index.php?app=store&id=$1&act=groupbuylast;
rewrite ^/store/([0-9]+)/groupbuy/page_([^/]+)/?$ /index.php?app=store&id=$1&act=groupbuy&page=$2last;

}

美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2019-11-9 09:21:44 | 显示全部楼层


更正,后面多了last

if (!-e $request_filename)
{


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

rewrite ^/goods/([0-9]+)/([^/]+)/?$ /index.php?app=goods&id=$1&act=$2;
rewrite ^/goods/([0-9]+)/([^/]+)/page_([^/]+)/?$ /index.php?app=goods&id=$1&act=$2&page=$3;
rewrite ^/groupbuy/([0-9]+)/?$ /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/([0-9]+).html$ /index.php?app=article&act=view&article_id=$1;
#店铺页面
rewrite ^/store/([0-9]+)/?$ /index.php?app=store&id=$1;
rewrite ^/store/article/([0-9]+).html$ /index.php?app=store&act=article&id=$1;
rewrite ^/store/([0-9]+)/credit/?$ /index.php?app=store&id=$1&act=credit;
rewrite ^/store/([0-9]+)/credit/page_([^/]+)/?$ /index.php?app=store&id=$1&act=credit&page=$2;
rewrite ^/store/([0-9]+)/credit/([0-9]+)/?$ /index.php?app=store&id=$1&act=credit&eval=$2;
rewrite ^/store/([0-9]+)/credit/([0-9]+)/page_([^/]+)/?$ /index.php?app=store&id=$1&act=credit&eval=$2&page=$3;
rewrite ^/store/([0-9]+)/goods/?$ /index.php?app=store&id=$1&act=search;
rewrite ^/store/([0-9]+)/goods/page_([^/]+)/?$ /index.php?app=store&id=$1&act=search&page=$2;
rewrite ^/store/([0-9]+)/category/([0-9]+)/?$ /index.php?app=store&id=$1&act=search&cate_id=$2;
rewrite ^/store/([0-9]+)/category/([0-9]+)/page_([^/]+)/?$ /index.php?app=store&id=$1&act=search&cate_id=$2&page=$3;
rewrite ^/store/([0-9]+)/groupbuy/?$ /index.php?app=store&id=$1&act=groupbuy;
rewrite ^/store/([0-9]+)/groupbuy/page_([^/]+)/?$ /index.php?app=store&id=$1&act=groupbuy&page=$2;

}
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-22 06:45 , Processed in 0.025249 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表