解决ecshop实现url重写伪静态和全静态

解决ecshop实现url重写伪静态和全静态

ID:11133266

大小:37.50 KB

页数:4页

时间:2018-07-10

解决ecshop实现url重写伪静态和全静态_第1页
解决ecshop实现url重写伪静态和全静态_第2页
解决ecshop实现url重写伪静态和全静态_第3页
解决ecshop实现url重写伪静态和全静态_第4页
资源描述:

《解决ecshop实现url重写伪静态和全静态》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库

1、ECshop2.7.2实现简单URL重写-伪静态及全静态*一、找到Apache服务器1、首先您需要找到Apache安装目录,之后找到conf目录下的httpd.conf文件。2、将下面的代码复制到httpd.conf文件中,注意将/ecshop替换为您的商店的实际安装目录。OptionsFollowSymLinksAllowOverrideAll3、在httpd.conf中搜索LoadModulerewrite_module,将该行前面的#号删除。如果您的Apache是1.3.x版本还需要查找AddModu

2、lemod_rewrite.c,请将前面的#删除。4、保存httpd.conf。5、将ecshop目录下的htaccess.txt重命名为.htaccess。(windows下用记事本打开然后另存为为.htaccess。)6、重新启动Apache。7、进入ecshop管理中心->商店设置,将URL简单重写设置为启用。如果您想通过httpd.conf来设置重写规则,请按照下面的步骤操作:1、执行上面第1-3步操作。2、找到您的商店所在的虚拟主机段,如:DocumentRoot"D:/php/xampp/htdocs"##EachdirectorytowhichApac

3、hehasaccesscanbeconfiguredwithrespect#towhichservicesandfeaturesareallowedand/ordisabledinthat#directory(anditssubdirectories).##First,weconfigurethe"default"tobeaveryrestrictivesetof#features.3、将下面的内容加入在此段代码后面。RewriteEngineOnRewriteRule^(.*)/index.html$$1/index.

4、phpRewriteRule^(.*)/category$$1/index.php[L]RewriteRule^(.*)/feed-c([0-9]+).xml$$1/feed.php?cat=$2[L]RewriteRule^(.*)/feed-b([0-9]+).xml$$1/feed.php?brand=$2[L]RewriteRule^(.*)/feed.xml$$1/feed.phpRewriteRule^(.*)/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)-([0-9]+)

5、-(.+)-([a-zA-Z]+)(.*).html$$1/category.php?id=$2&brand=$3&price_min=$4&price_max=$5&filter_attr=$6&page=$7&sort=$8&order=$9[QSA,L]RewriteRule^(.*)/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*).html$$1/category.php?id=$2&brand=$3&price_min=$4&price_max=$5&filter_attr

6、=$6[QSA,L]RewriteRule^(.*)/category-([0-9]+)-b([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html$$1/category.php?id=$2&brand=$3&page=$4&sort=$5&order=$6[QSA,L]RewriteRule^(.*)/category-([0-9]+)-b([0-9]+)-([0-9]+)(.*).html$$1/category.php?id=$2&brand=$3&page=$4[QSA,L]RewriteRule^(.*)/categor

7、y-([0-9]+)-b([0-9]+)(.*).html$$1/category.php?id=$2&brand=$3[QSA,L]RewriteRule^(.*)/category-([0-9]+)(.*).html$$1/category.php?id=$2[QSA,L]RewriteRule^(.*)/goods-([0-9]+)(.*).html$$1/goods.php?id=$2[QSA,L]RewriteRule^(.*)/article_cat-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html$$1

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。