欢迎来到天天文库
浏览记录
ID:14892807
大小:54.00 KB
页数:6页
时间:2018-07-30
《ecshop url rewrite重写教程》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、EcshopURLRewrite重写教程ECSHOP开发中心(68ecshop.com)ECSHOPv2.0以上版本URLRewrite使用说明********************************************************************************一、Apache服务器******************************************************************************* 1、首先您需要找到Apache安装目录,之后找到conf目录下的h
2、ttpd.conf文件。 2、将下面的代码复制到httpd.conf文件中,注意将/ecshop替换为您的商店的实际 安装目录。 OptionsFollowSymLinks AllowOverrideAll 3、在httpd.conf中搜索LoadModulerewrite_module,将该行前面的#号删除。 如果您的Apache是1.3.x版本还需要查找AddModulemod_rewrite.c, 请将前面的#删除。 4、保存httpd.conf。
3、5、将ecshop目录下的htaccess.txt重命名为.htaccess。 6、重新启动Apache。 7、进入ecshop管理中心->商店设置,将URL重写设置为启用。 如果您想通过httpd.conf来设置重写规则,请按照下面的步骤操作: 1、执行上面第1-3步操作。 2、找到您的商店所在的虚拟主机段,如: DocumentRoot"/home/ecshop/" ServerNamewww.ecshop.com 3、将下面
4、的内容加入在之前 RewriteEngineOn RewriteRule^(.*)/index.html$ $1/index.php RewriteRule^(.*)/category$ $1/index.php [L] RewriteRule^(.*)/feed-c([0-9]+).xml$ $1/feed.php?cat=$2
5、 [L] RewriteRule^(.*)/feed-b([0-9]+).xml$ $1/feed.php?brand=$2 [L] RewriteRule^(.*)/feed-type([^-]+).xml$ $1/feed.php?type=$2 [L] RewriteRule^(.*)/feed.xml$ $1/feed.php [L] RewriteRule^
6、(.*)/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)-([0-9]+)-(.+)-([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
7、]+)-attr([^-]*)(.*).html$ $1/category.php?id=$2&brand=$3&price_min=$4&price_max=$5&filter_attr=$6[QSA,L] RewriteRule^(.*)/category-([0-9]+)-b([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html$ $1/category.php?id=$2&brand=$3&pa
8、ge=$4&sort=$5&order=$6[QSA,L] RewriteRule^(.*)/category-([0
此文档下载收益归作者所有