URL重写问题,论坛重写成功,ECSHOP不成功,内有配置文件,请橘子等高手帮忙检查

2016-07-07 15:24 来源:www.chinab4c.com 作者:ecshop专家

URL重写问题,论坛重写成功,ECSHOP不成功,内有配置文件,请橘子等高手帮忙检查
IIS环境下
虚拟主机的客服很有耐心的帮我做了调整,调整到最后是,(DISCUZ)http://www.i9buy.com/bbs能够支持重写,但ECSHOP怎么也实现不了,ECSHOP直接在根目录下(/wwwroot/)http://www.i9buy.com/;我们折腾了半天也没有调整好,以下我将httpd.ini的相关配置发出,请帮忙检查;

[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP
RewriteRule ^(.*)/archiver/((fid|tid)-[0-9]+\.html)\?*(.*)$ $1/archiver/index\.php\?$2&$4
RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/forumdisplay\.php\?fid=$2&page=$3&$4
RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/viewthread\.php\?tid=$2&extra=page\%3D$4&page=$3&$4
RewriteRule ^(.*)/space-(username|uid)-(.+)\.html\?*(.*)$ $1/space\.php\?$2=$3&$4
RewriteRule ^(.*)/tag-(.+)\.html\?*(.*)$ $1/tag\.php\?name=$2&$3
RewriteCond %{HTTP:Host} (?:www\.)?site1\.com
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 ^(.*)/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?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 ^(.*)/group_buy-([0-9]+)\.html$$1/group_buy.php?act=view&id=$2[I]

另,我已经在后台开启简单重写功能,已将htaccess.txt修改成了.htaccess,已经换过几次;
请教各位问题出在哪儿了,另外我想不用每个站点都要单独配置一个吧;

谢谢大家的帮忙!

回答:
IIS 下的ec的rewrite

RewriteCond %{HTTP:Host} 您的网址

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


正确!!!已经解决,谢谢橘子!!!



问题解决了,请把帖子状态置为已解决。

官方的IIS 规则有问题!

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$

冷柜
熟食柜