请直接新建1个txt文档,再复制虚横线之下的代码内容,粘贴到txt文档里面保存后,再修改文档文件名为httpd.ini就可以了。
将httpd.ini文件直接上传到FTP空间的WEB文件夹根目录下即可使用。其他空间商的服务器不一定能正常使用。
注意:这个伪静态规则文件仅适合ECSHOP商城使用,www.seobbc.net请修改为自己的域名!
———————————————————————————————
[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP
RewriteCond %{HTTP:Host} www.seobbc.net
RewriteRule ^(.*)/index.html$ $1/index\.php
RewriteRule ^(.*)/category$ $1/index\.php
RewriteRule ^(.*)/feed-c([0-9]+).xml$ $1/feed\.php\?cat=$2
RewriteRule ^(.*)/feed-b([0-9]+).xml$ $1/feed\.php\?brand=$2
RewriteRule ^(.*)/feed.xml$ $1/feed\.php
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
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
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
RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)-([0-9]+)(.*)\.html$ $1/category\.php\?id=$2&brand=$3&page=$4
RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)(.*)\.html$ $1/category\.php\?id=$2&brand=$3
RewriteRule ^(.*)/category-([0-9]+)(.*)\.html$ $1/category\.php\?id=$2
RewriteRule ^(.*)/goods-([0-9]+)(.*)\.html$ $1/goods\.php\?id=$2
RewriteRule ^(.*)/article_cat-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$ $1/article_cat\.php\?id=$2&page=$3&sort=$4&order=$5
RewriteRule ^(.*)/article_cat-([0-9]+)-([0-9]+)(.*)\.html$ $1/article_cat\.php\?id=$2&page=$3
RewriteRule ^(.*)/article_cat-([0-9]+)(.*)\.html$ $1/article_cat\.php\?id=$2
RewriteRule ^(.*)/article-([0-9]+)(.*)\.html$ $1/article\.php\?id=$2
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
RewriteRule ^(.*)/brand-([0-9]+)-c([0-9]+)-([0-9]+)(.*)\.html $1/brand\.php\?id=$2&cat=$3&page=$4
RewriteRule ^(.*)/brand-([0-9]+)-c([0-9]+)(.*)\.html $1/brand\.php\?id=$2&cat=$3
RewriteRule ^(.*)/brand-([0-9]+)(.*)\.html $1/brand\.php\?id=$2
RewriteRule ^(.*)/tag-(.*)\.html $1/search\.php\?keywords=$2
RewriteRule ^(.*)/snatch-([0-9]+)\.html$ $1/snatch\.php\?id=$2
RewriteRule ^(.*)/group_buy-([0-9]+)\.html$ $1/group_buy\.php\?act=view&id=$2