
ECMall 2.1 以上版本 URL 重写使用说明
===============================================================================

  URL重写技术可以让你的网站具有更高的可用性和友好性。同时通过 URL 重写还能有效
  的提高网站内容在搜索引擎的收录率。

  下面分别介绍在 Apache 服务器以及 IIS 服务器下的使用方法：

一、Apache 服务器
-------------------------------------------------------------------------------

  1、首先您需要找到 Apache 安装目录，之后找到 conf 目录下的 httpd.conf 文件。
  2、将下面的代码复制到 httpd.conf 文件中，注意将 /ecmall 替换为您的商店的实际
  安装目录。

    <Directory /ecmall>
      Options FollowSymLinks
      AllowOverride All
    </Directory>

   3、在 httpd.conf 中搜索 LoadModule rewrite_module，将该行前面的 # 号删除。
      如果您的 Apache 是1.3.x版本还需要查找 AddModule mod_rewrite.c，
      请将前面的#删除。
   4、保存 httpd.conf。
   5、将 ecmall 目录下的 htaccess.txt 重命名为 .htaccess。
   6、重新启动 Apache。
   7、进入 ECMall 管理中心->网站设置->系统设置，将 启用伪静态 设置为“是”。

二、IIS 服务器
-------------------------------------------------------------------------------

  1、首先请进入以下网址 http://www.helicontech.com/download/，下载免费版的
  ISAPI_Rewrite组件：ISAPI_Rewrite Lite ( freeware )。如果您仅仅是测试用途使用
  这个就足够了，如果您是商业应用建议您购买完整版的 ISAPI_Rewrite Full。

  2、点击下载到本地的文件 isapi_rwl_x86_0064.msi （该文件名和您下载的版本有关）
  进行安装，安装成功之后进入安装目录（默认在
  C:/Program Files/Helicon/ISAPI_Rewrite）找到httpd.ini文件，点击右键将文件只读
  属性去掉。然后进入： 开始菜单->程序->Helicon->ISAPI_Rewrite->httpd.ini，
  点击打开 httpd.ini 文件。

  3、复制下面的内容到httpd.ini文件
-----内容开始，不要复制本行-----
[ISAPI_Rewrite]

# 为了确保重写规则不影响服务器上的其他站点
# 请将下面的语句前的#号去掉，并将(?:www\.)?site1\.com改为商店所在域名

#RewriteCond %{HTTP:Host} (?:www\.)?site1\.com

RewriteRule ^goods/([0-9]+)/?$ index.php?app=goods&id=$1 [I]
RewriteRule ^goods/([0-9]+)/([^/]+)/?$ index.php?app=goods&id=$1&act=$2 [I]
RewriteRule ^goods/([0-9]+)/([^/]+)/page_([^/]+)/?$ index.php?app=goods&id=$1&act=$2&page=$3 [I]
RewriteRule ^groupbuy/([0-9]+)/?$ index.php?app=groupbuy&id=$1 [I]
RewriteRule ^category/goods/?$ index.php?app=category [I]
RewriteRule ^category/(.*)/?$ index.php?app=category&act=$1 [I]
RewriteRule ^brand/?$ index.php?app=brand [I]
RewriteRule ^article/([0-9]+).html$ index.php?app=article&act=view&article_id=$1 [I]
RewriteRule ^store/([0-9]+)/?$ index.php?app=store&id=$1 [I]
RewriteRule ^store/article/([0-9]+).html$ index.php?app=store&act=article&id=$1 [I]
RewriteRule ^store/([0-9]+)/credit/?$ index.php?app=store&id=$1&act=credit [I]
RewriteRule ^store/([0-9]+)/credit/page_([^/]+)/?$ index.php?app=store&id=$1&act=credit&page=$2 [I]
RewriteRule ^store/([0-9]+)/credit/([0-9]+)/?$ index.php?app=store&id=$1&act=credit&eval=$2 [I]
RewriteRule ^store/([0-9]+)/credit/([0-9]+)/page_([^/]+)/?$ index.php?app=store&id=$1&act=credit&eval=$2&page=$3 [I]
RewriteRule ^store/([0-9]+)/goods/?$ index.php?app=store&id=$1&act=search [I]
RewriteRule ^store/([0-9]+)/goods/page_([^/]+)/?$ index.php?app=store&id=$1&act=search&page=$2 [I]
RewriteRule ^store/([0-9]+)/category/([0-9]+)/?$ index.php?app=store&id=$1&act=search&cate_id=$2 [I]
RewriteRule ^store/([0-9]+)/category/([0-9]+)/page_([^/]+)/?$ index.php?app=store&id=$1&act=search&cate_id=$2&page=$3 [I]
RewriteRule ^store/([0-9]+)/groupbuy/?$ index.php?app=store&id=$1&act=groupbuy [I]
RewriteRule ^store/([0-9]+)/groupbuy/page_([^/]+)/?$ index.php?app=store&id=$1&act=groupbuy&page=$2 [I]
-----内容结束，不要复制本行-----

  4、保存 httpd.ini，进入 ECMall 管理中心->网站设置->系统设置，将 启用伪静态 设置为“是”。
