公司新闻
行业动态

ECmall 伪静态 IIS7/7.5下使用官方URL重写模块实现

2016-01-05 13:52:02

ECmall iis7.5 伪静态

1、先到IIS官方下载模块并安装
下载地址:http://www.iis.net/downloads/microsoft/url-rewrite

 
2、这个时候再进 “Internet 信息服务(IIS)管理器”,就可以看见模块中多了一个 Url 重写 模块


3、进入需要设置的站点,双击 Url 重写 图标,进入设置界面。然后点击右侧的“导入规则... ”



4、进ECmall后台设置里开启伪静态功能

大功告成!演示案例:优品客http://www.youpink.cn/
在网站根目录找不到htaccess.txt文件的话,伪静态规则如下:RewriteEngine On

商品详情 RewriteRule ^goods/([0-9]+)/?$ index.php?app=goods&id=$1 [L] RewriteRule ^goods/([0-9]+)/([^/]+)/?$ index.php?app=goods&id=$1&act=$2 [L] RewriteRule ^goods/([0-9]+)/([^/]+)/page_([^/]+)/?$ index.php?app=goods&id=$1&act=$2&page=$3 [L] RewriteRule ^groupbuy/([0-9]+)/?$ index.php?app=groupbuy&id=$1 [L]

分类   RewriteRule ^category/goods/?$ index.php?app=category [L] RewriteRule ^category/(.*)/?$ index.php?app=category&act=$1 [L]

品牌   RewriteRule ^brand/?$ index.php?app=brand [L]

文章   RewriteRule ^article/([0-9]+).html$ index.php?app=article&act=view&article_id=$1 [L]

店铺页面   RewriteRule ^store/([0-9]+)/?$ index.php?app=store&id=$1 [L] RewriteRule ^store/article/([0-9]+).html$ index.php?app=store&act=article&id=$1 [L] RewriteRule ^store/([0-9]+)/credit/?$ index.php?app=store&id=$1&act=credit [L] RewriteRule ^store/([0-9]+)/credit/page_([^/]+)/?$ index.php?app=store&id=$1&act=credit&page=$2 [L] RewriteRule ^store/([0-9]+)/credit/([0-9]+)/?$ index.php?app=store&id=$1&act=credit&eval=$2 [L] RewriteRule ^store/([0-9]+)/credit/([0-9]+)/page_([^/]+)/?$ index.php?app=store&id=$1&act=credit&eval=$2&page=$3 [L] RewriteRule ^store/([0-9]+)/goods/?$ index.php?app=store&id=$1&act=search [L] RewriteRule ^store/([0-9]+)/goods/page_([^/]+)/?$ index.php?app=store&id=$1&act=search&page=$2 [L] RewriteRule ^store/([0-9]+)/category/([0-9]+)/?$ index.php?app=store&id=$1&act=search&cate_id=$2 [L] RewriteRule ^store/([0-9]+)/category/([0-9]+)/page_([^/]+)/?$ index.php?app=store&id=$1&act=search&cate_id=$2&page=$3 [L] RewriteRule ^store/([0-9]+)/groupbuy/?$ index.php?app=store&id=$1&act=groupbuy [L] RewriteRule ^store/([0-9]+)/groupbuy/page_([^/]+)/?$ index.php?app=store&id=$1&act=groupbuy&page=$2 [L]


文章来源:
.
© 2013        All Rights Reserved.