最新消息:伪静态技术大全博客开通啦!再也不为伪静态东奔西走!更多问题可以反映给博主:野狼,QQ1615241386 QQ交流群:112696646

ecshop 2.73 IIS的httpd.conf格式伪静态规则分享【博主亲测可用】

现在用的一般都是ecshop2.73版本,这里分享的是httpd.conf格式的伪静态规则。因为ecshop官方的规则比较少,这里增加了一些例如团购的,可以支持大部分ecshop的二次开发版本。当然,因为ecshop的插件很多,如果是使用过程中发现某些链接打不开,可以联系野狼(QQ1615241386)协助您解决。
1、直接上伪静态规则(可以保存成http.conf文件):

[ISAPI_Rewrite]
CacheClockRate 3600
RepeatLimit 32
#ecshop
RewriteRule ^(.*)/index.html$ $1/index.php [I]
RewriteRule ^(.*)/category$ $1/index.php [I]
RewriteRule ^(.*)/feed-c([0-9]+).xml$ $1/feed.php?cat=$2 [I]
RewriteRule ^(.*)/feed-b([0-9]+).xml$ $1/feed.php?brand=$2 [I]
RewriteRule ^(.*)/feed.xml$ $1/feed.php [I]
RewriteRule ^(.*)/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 [I]
RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*).html$ $1/category.php?id=$2&brand=$3&price_min=$4&price_max=$5&filter_attr=$6 [I]
RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html$ $1/category.php?id=$2&brand=$3&page=$4&sort=$5&order=$6 [I]
RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)-([0-9]+)(.*).html$ $1/category.php?id=$2&brand=$3&page=$4 [I]
RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)(.*).html$ $1/category.php?id=$2&brand=$3 [I]
RewriteRule ^(.*)/category-([0-9]+)(.*).html$ $1/category.php?id=$2 [I]
RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+).html(.*)$ $1/category.php?$4&id=$2&brand=$3
RewriteRule ^(.*)/goods-([0-9]+)(.*).html$ $1/goods.php?id=$2 [I]
RewriteRule ^(.*)/article_cat-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html$ $1/article_cat.php?id=$2&page=$3&sort=$4&order=$5 [I]
RewriteRule ^(.*)/article_cat-([0-9]+)-([0-9]+)(.*).html$ $1/article_cat.php?id=$2&page=$3 [I]
RewriteRule ^(.*)/article_cat-([0-9]+)(.*).html$ $1/article_cat.php?id=$2 [I]
RewriteRule ^(.*)/article-([0-9]+)(.*).html$ $1/article.php?id=$2 [I]
RewriteRule ^(.*)/brand-([0-9]+)-c([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+).html $1/brand.php?id=$2&cat=$3&page=$4&sort=$5&order=$6 [I]
RewriteRule ^(.*)/brand-([0-9]+)-c([0-9]+)-([0-9]+)(.*).html $1/brand.php?id=$2&cat=$3&page=$4 [I]
RewriteRule ^(.*)/brand-([0-9]+)-c([0-9]+).html(.*)$ $1/brand.php?$4&id=$2&cat=$3 [I]
RewriteRule ^(.*)/brand-([0-9]+)-c([0-9]+)(.*).html $1/brand.php?id=$2&cat=$3 [I]
RewriteRule ^(.*)/brand-([0-9]+)(.*).html $1/brand.php?id=$2 [I]
RewriteRule ^(.*)/tag-(.*).html $1/search.php?keywords=$2 [I]
RewriteRule ^(.*)/snatch-([0-9]+).html$ $1/snatch.php?id=$2 [I]
RewriteRule ^(.*)/(activity|group_buy|brand).html$ $1/$2.php [I]
RewriteRule ^(.*)/group_buy-([0-9]+).html$ $1/group_buy.php?act=view&id=$2 [I]
RewriteRule ^(.*)/auction-([0-9]+).html$ $1/auction.php?act=view&id=$2 [I]
RewriteRule ^(.*)/exchange-id([0-9]+)(.*).html$ $1/exchange.php?id=$2&act=view [I]
RewriteRule ^(.*)/exchange-([0-9]+)-min([0-9]+)-max([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html$ $1/exchange.php?cat_id=$2&integral_min=$3&integral_max=$4&page=$5&sort=$6&order=$7 [I]
RewriteRule ^(.*)/exchange-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html$ $1/exchange.php?cat_id=$2&page=$3&sort=$4&order=$5 [I]
RewriteRule ^(.*)/exchange-([0-9]+)-([0-9]+)(.*).html$ $1/exchange.php?cat_id=$2&page=$3 [I]
RewriteRule ^(.*)/exchange-([0-9]+)(.*).html$ $1/exchange.php?cat_id=$2 [I]

注:这个规则增加了一些非必要的规则,因为加上之后并不干扰程序运行,没有加上的话有一些开发了一些团购功能的则不能使用。
二、该伪静态规则使用方法:
1、要安装支持httpd.conf的组件,如果还未安装请到这里下载:http://www.weijingtai.org/download/httpd-conf.html
2、用笔记本或者将以上代码复制到httpd.conf文件中。
3、请到ecshop后台开启伪静态功能。
4、启用伪静态后,ecshop的导航有可能还是动态,请到后台导航设置处修改即可。
 
三、注意事项
1、如果网站没有启用伪静态功能,该组件将不被调用。
2、二次开发过的程序,可能路径有所改变,伪静态规则自然需要进行二次调整。需要自定义伪静态规则可以联系野狼1615241386
 
 

您必须 登录 才能发表评论!

网友最新评论 (1)

  1. 全部亲测可用,如有配置不成功的,留言给我或者加QQ1615241386
    野狼7年前 (2014-09-27)