您现在的位置是:首页 > cms教程 > Ecshop商城教程Ecshop商城教程
ecshop商城nginx环境实现url静态化的方法
语兰2024-12-23Ecshop商城教程已有人查阅
导读1、在nginx/conf/tuwen.com.conf中添加:include ecshop.conf;2、编辑nginx/ecshop.conf:3、重启nginx:
1、在nginx/conf/tuwen.com.conf中添加:
include ecshop.conf;
2、编辑nginx/ecshop.conf:
include ecshop.conf;
2、编辑nginx/ecshop.conf:
location / {
rewrite "^/index\.html" /index.php last;
rewrite "^/category$" /index.php last;
rewrite "^/feed-c([0-9]+)\.xml$" /feed.php?cat=$1 last;
rewrite "^/feed-b([0-9]+)\.xml$" /feed.php?brand=$1 last;
rewrite "^/feed\.xml$" /feed.php last;
rewrite "^/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 last;
rewrite "^/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 last;
rewrite "^/category-([0-9]+)-b([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$" /category.php?id=$1&brand=$2&page=$3&sort=$4&order=$5 last;
rewrite "^/category-([0-9]+)-b([0-9]+)-([0-9]+)(.*)\.html$" /category.php?id=$1&brand=$2&page=$3 last;
rewrite "^/category-([0-9]+)-b([0-9]+)(.*)\.html$" /category.php?id=$1&brand=$2 last;
rewrite "^/category-([0-9]+)(.*)\.html$" /category.php?id=$1 last;
rewrite "^/goods-([0-9]+)(.*)\.html" /goods.php?id=$1 last;
rewrite "^/article_cat-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$" /article_cat.php?id=$1&page=$2&sort=$3&order=$4 last;
rewrite "^/article_cat-([0-9]+)-([0-9]+)(.*)\.html$" /article_cat.php?id=$1&page=$2 last;
rewrite "^/article_cat-([0-9]+)(.*)\.html$" /article_cat.php?id=$1 last;
rewrite "^/article-([0-9]+)(.*)\.html$" /article.php?id=$1 last;
rewrite "^/brand-([0-9]+)-c([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)\.html" /brand.php?id=$1&cat=$2&page=$3&sort=$4&order=$5 last;
rewrite "^/brand-([0-9]+)-c([0-9]+)-([0-9]+)(.*)\.html" /brand.php?id=$1&cat=$2&page=$3 last;
rewrite "^/brand-([0-9]+)-c([0-9]+)(.*)\.html" /brand.php?id=$1&cat=$2 last;
rewrite "^/brand-([0-9]+)(.*)\.html" /brand.php?id=$1 last;
rewrite "^/tag-(.*)\.html" /search.php?keywords=$1 last;
rewrite "^/snatch-([0-9]+)\.html$" /snatch.php?id=$1 last;
rewrite "^/group_buy-([0-9]+)\.html$" /group_buy.php?act=view&id=$1 last;
rewrite "^/auction-([0-9]+)\.html$" /auction.php?act=view&id=$1 last;
rewrite "^/exchange-id([0-9]+)(.*)\.html$" /exchange.php?id=$1&act=view last;
rewrite "^/exchange-([0-9]+)-min([0-9]+)-max([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$" /exchange.php?cat_id=$1&integral_min=$2&integral_max=$3&page=$4&sort=$5&order=$6 last;
rewrite "^/exchange-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$" /exchange.php?cat_id=$1&page=$2&sort=$3&order=$4 last;
rewrite "^/exchange-([0-9]+)-([0-9]+)(.*)\.html$" /exchange.php?cat_id=$1&page=$2 last;
rewrite "^/exchange-([0-9]+)(.*)\.html$" /exchange.php?cat_id=$1 last;
}
3、重启nginx:
/usr/local/nginx/sbin/nginx -s reload
本文标签:
很赞哦! ()
相关教程
图文教程
ecshop验证码php文件
<?php//仿制ecshop验证码(四位大写字母和数字、背景)//处理码值(四位大写字母和数字组成)//所有的可能的字符$chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
ecshop商品详细页显示折扣率或节省金额的方法
在商品详情页面增加一个“本店价”相对于“市场价”的折扣比率或者是节省的钱数,岂不是一个很酷的效果,而且让用户看着更明白,对购买者更有吸引力。
ecshop销售排行榜自定义插件
由于ecshop很多功能都已经做好了,模式比较固定,比如销售排行榜,ecshop会根据你网店商品真实的成交率来为用户呈现真正的销售排行榜。
ecshop购物车仿淘宝效果
这个功能 要求用层来实现,当时实在太菜,今天我终于做了修改下来我把我的做法贴出来 网友们做参考 有不对的地方多多指正。
相关源码
-
(自适应)水墨风中药馆中医名医介绍pbootcms网站模板本模板基于PbootCMS内核开发,为中医馆、中医药企业量身定制,可快速搭建具有传统文化特色的官方网站。自适应手机端设计,数据实时同步,助您高效展示中医特色诊疗、中药产品、养生知识等内容,塑造专业品牌形象。查看源码 -
(自适应)响应式文章博客互联网新闻pbootcms模板下载本模板基于PbootCMS开发,专为科技新闻、互联网资讯和文章博客类网站设计。采用响应式布局技术,确保在电脑、平板和手机上都能获得最佳浏览体验。适用于科技媒体、行业博客查看源码 -
(自适应响应式)高端简繁双语HTML5金融资本咨询单页pbootcms模板采用响应式设计确保在各类手机端设备很好的呈现。该模板专注于金融咨询、资本管理等领域企业形象展示,通过结构化布局突出行业专业度与可信度,后台数据同步管理简化内容维护流程。查看源码 -
响应式高端家居家具装修类pbootcms模板网站源码家居装修、空间设计企业打造的营销型网站解决方案,基于PbootCMS内核深度开发。采用前沿响应式架构,适配手机端与PC端浏览体验查看源码 -
(自适应)建站广告公司工作室作品展示品牌策划设计pbootcms源码下载基于PbootCMS开发的创意服务展示系统,内置作品集展示、服务流程图等专业模块,预设客户案例、设计流程等创意行业专属栏目结构。查看源码 -
(响应式)wordpress模板VieuV4.5主题资讯自媒体博客源码Vieu主题专注于个人博客与企业展示场景,采用响应式设计确保在手机、电脑、平板等多设备上的展示。主题集成会员中心、投稿系统、内容保护等实用功能,满足现代博客网站的建设需求。查看源码
| 分享笔记 (共有 篇笔记) |
