﻿
ShopMX 2.0 以上版本 URL 重写使用说明
===============================================================================

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

  下面分别介绍 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.aspx?app=goods&id=$1 [I]
RewriteRule ^goods/([0-9]+)/([^/]+)/?$ index.aspx?app=goods&id=$1&act=$2 [I]
RewriteRule ^goods/([0-9]+)/([^/]+)/page_([^/]+)/?$ index.aspx?app=goods&id=$1&act=$2&page=$3 [I]
RewriteRule ^groupbuy/([0-9]+)/?$ index.aspx?app=groupbuy&id=$1 [I]
RewriteRule ^category/goods/?$ index.aspx?app=category [I]
RewriteRule ^category/(.*)/?$ index.aspx?app=category&act=$1 [I]
RewriteRule ^brand/?$ index.aspx?app=brand [I]
RewriteRule ^article/([0-9]+).html$ index.aspx?app=article&act=view&article_id=$1 [I]
RewriteRule ^store/([0-9]+)/?$ index.aspx?app=store&id=$1 [I]
RewriteRule ^store/article/([0-9]+).html$ index.aspx?app=store&act=article&id=$1 [I]
RewriteRule ^store/([0-9]+)/credit/?$ index.aspx?app=store&id=$1&act=credit [I]
RewriteRule ^store/([0-9]+)/credit/page_([^/]+)/?$ index.aspx?app=store&id=$1&act=credit&page=$2 [I]
RewriteRule ^store/([0-9]+)/credit/([0-9]+)/?$ index.aspx?app=store&id=$1&act=credit&eval=$2 [I]
RewriteRule ^store/([0-9]+)/credit/([0-9]+)/page_([^/]+)/?$ index.aspx?app=store&id=$1&act=credit&eval=$2&page=$3 [I]
RewriteRule ^store/([0-9]+)/goods/?$ index.aspx?app=store&id=$1&act=search [I]
RewriteRule ^store/([0-9]+)/goods/page_([^/]+)/?$ index.aspx?app=store&id=$1&act=search&page=$2 [I]
RewriteRule ^store/([0-9]+)/category/([0-9]+)/?$ index.aspx?app=store&id=$1&act=search&cate_id=$2 [I]
RewriteRule ^store/([0-9]+)/category/([0-9]+)/page_([^/]+)/?$ index.aspx?app=store&id=$1&act=search&cate_id=$2&page=$3 [I]
RewriteRule ^store/([0-9]+)/groupbuy/?$ index.aspx?app=store&id=$1&act=groupbuy [I]
RewriteRule ^store/([0-9]+)/groupbuy/page_([^/]+)/?$ index.aspx?app=store&id=$1&act=groupbuy&page=$2 [I]
-----内容结束，不要复制本行-----

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