stephen wang

stephen的记事本。

导航

« 关于BLOG后台密码结婚与招标等式 »

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

  1. Gravatar Icon 广州seo Says:

    我的店也是ecshop,弄了很久都弄不了,愁

  2. Gravatar Icon 可乐 Says:

    博主,我的改了没有用呀

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

Category

Recent Comments

Recent Article

Powered By Z-Blog 1.8 Walle Build 100427

Copyright xxxx-xxxx Your WebSite. Some Rights Reserved.