ECSHOP的伪静态规则

今天中午在公司接到一个客户的投诉说ecshop开启伪静态后出现404页面,我当时纳闷了,不对啊,我们服务器安装了伪静态啊,而且关于ecshop 的规则是我自己加上去的啊。然后看了下找不到问题,登录后台提示必须要apche支持,当时想想是不是WEB SERVER不支持,打电话去开发公司,人家来了一句对免费用户我们不提供任何支持,当时就那个急啊,还好问了一句支持IIS伪静态不,他们说支持,把它自带的规则放到服务器上还是一样,最后看了下是不是规则格式不一样啊,自己试着修改了下,还真是。测试了下OK。当时那个激动啊,这还是自己第一次写伪静态规则。现在在这贴给大家,希望对大家有用。

规则如下:

#ecshop
#RewriteRule ^(.*)/index.html    $1/index.php [I]
#RewriteRule ^(.*)/default.html  $1/index.php [I]

# access any object by its numeric identifier
RewriteRule /feed-c([0-9]+)\.xml /feed\.php\?cat=$1
RewriteRule /feed-b([0-9]+)\.xml /feed\.php\?brand=$1
RewriteRule /feed\.xml$                 feed\.php

RewriteRule /category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html /category\.php\?id=$1&brand=$2&price_min=$3&price_max=$4&filter_attr=$5&page=$6&sort=$7&order=$8
RewriteRule /category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)(.*)\.html /category\.php\?id=$1&brand=$2&price_min=$3&price_max=$4&filter_attr=$5
RewriteRule /category-([0-9]+)-b([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html /category\.php\?id=$1&brand=$2&page=$3&sort=$4&order=$5
RewriteRule /category-([0-9]+)-b([0-9]+)-([0-9]+)(.*)\.html /category\.php\?id=$1&brand=$2&page=$3
RewriteRule /category-([0-9]+)-b([0-9]+)(.*)\.html /category\.php\?id=$1&brand=$2
RewriteRule /category-([0-9]+)(.*)\.html /category\.php\?id=$1

RewriteRule /goods-([0-9]+)(.*)\.html /goods\.php\?id=$1

RewriteRule /article_cat-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html /article_cat\.php\?id=$1&page=$2&sort=$3&order=$4
RewriteRule /article_cat-([0-9]+)-([0-9]+)(.*)\.html /article_cat\.php\?id=$1&page=$2
RewriteRule /article_cat-([0-9]+)(.*)\.html /article_cat\.php\?id=$1

RewriteRule /article-([0-9]+)(.*)\.html /article\.php\?id=$1

RewriteRule /brand-([0-9]+)-c([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)\.html /brand\.php\?id=$1&cat=$2&page=$3&sort=$4&order=$5
RewriteRule /brand-([0-9]+)-c([0-9]+)-([0-9]+)(.*)\.html /brand\.php\?id=$1&cat=$2&page=$3
RewriteRule /brand-([0-9]+)-c([0-9]+)(.*)\.html /brand\.php\?id=$1&cat=$2
RewriteRule /brand-([0-9]+)(.*)\.html /brand\.php\?id=$1

RewriteRule /tag-(.*)\.html /search\.php\?keywords=$1
RewriteRule /snatch-([0-9]+)\.html /snatch\.php\?id=$1
RewriteRule /group_buy-([0-9]+)\.html /group_buy\.php\?act=view&id=$1
RewriteRule /auction-([0-9]+)\.html /auction\.php\?act=view&id=$1

 

 

注意,因为我们是做虚拟主机的,所以注销了index.html与default.html

引用通告: 我要引用此文章
Tags: ecshop  伪静态  规则  
相关日志:
评论: 2 | 引用: 0 | 查看次数:
回复 广州seo [2009-5-30 下午 03:32:02]
我的店也是ecshop,弄了很久都弄不了,愁
回复 可乐 [2009-12-30 上午 09:37:21]
博主,我的改了没有用呀
发表评论
昵 称:
邮 箱:
主 页:
验证码:
内 容: