网站大量收购独家精品文档,联系QQ:2885784924

解决ECshop实现URL重写伪静态和全静态.doc

解决ECshop实现URL重写伪静态和全静态.doc

  1. 1、本文档共4页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
解决ECshop实现URL重写伪静态和全静态

ECshop 2.7.2实现简单URL重写-伪静态及全静态 * 一、找到Apache 服务器 1、首先您需要找到 Apache 安装目录,之后找到 conf 目录下的 httpd.conf 文件。 2、将下面的代码复制到 httpd.conf 文件中,注意将 /ecshop 替换为您的商店的实际 安装目录。 Directory /ecshop Options FollowSymLinks AllowOverride All /Directory 3、在 httpd.conf 中搜索 LoadModule rewrite_module,将该行前面的 # 号删除。 如果您的 Apache 是1.3.x版本还需要查找 AddModule mod_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 # # Each directory to which Apache has access can be configured with respect # to which services and features are allowed and/or disabled in that # directory (and its subdirectories). # # First, we configure the default to be a very restrictive set of # features. 3、将下面的内容加入在此段代码后面。 IfModule mod_rewrite.c RewriteEngine On RewriteRule ^(.*)/index.html$ $1/index.php RewriteRule ^(.*)/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.php RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$ $1/category.php?id=$2brand=$3price_min=$4price_max=$5filter_attr=$6page=$7sort=$8order=$9 [QSA,L] RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)\.html$ $1/category.php?id=$2brand=$3price_min=$4price_max=$5filter_attr=$6 [QSA,L] RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$ $1/category.php?id=$2brand=$3page=$4sort=$5order=$6 [QSA,L

文档评论(0)

qwd513620855 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档