2.6.1 IIS下怎么伪静态

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



由于原空间访问太慢,今天换到新空间,可没想伪静态不能使用,PS:原空间里伪静态都正常。一看才知道现在的空间是IIS的,还导致我网站禁止重写后知识区进不了,发现链接地址竟然还是简单重写时的链接!www.magic-shop.cn
用的西部数码的空间,用了他们贴出来的ECSHOP伪静态规则,不行,有一网友热心给了我一规则,也不行。在论坛搜索了好久没有找到解决方案,发个帖子看看能不能得到解决。

回答:
#ecshop
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=$2&price_min=$3&price_max=$4&filter_attr=$5&page=$6&sort=$7&order=$8 [I]
RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^(.*)/-]*)(.*)\.html$ $1/category.php?id=$2&brand=$2&price_min=$3&price_max=$4&filter_attr=$5 [I]
RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$$1/category.php?id=$2&brand=$2&page=$3&sort=$4&order=$5 [I]
RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)-([0-9]+)(.*)\.html$ $1/category.php?id=$2&brand=$2&page=$3[I]
RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)(.*)\.html$ $1/category.php?id=$2&brand=$2[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=$2&sort=$3&order=$4[I]
RewriteRule ^(.*)/article_cat-([0-9]+)-([0-9]+)(.*)\.html$ $1/article_cat.php?id=$2&page=$2[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=$2&page=$3&sort=$4&order=$5 [I]
RewriteRule ^(.*)/brand-([0-9]+)-c([0-9]+)-([0-9]+)(.*)\.html $1/brand.php?id=$2&cat=$2&page=$3 [I]
RewriteRule ^(.*)/brand-([0-9]+)-c([0-9]+)(.*)\.html $1/brand.php?id=$2&cat=$2 [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]
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=$2&integral_max=$3&page=$4&sort=$5&order=$6 [I]
RewriteRule ^(.*)/exchange-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$ $1/exchange.php?cat_id=$2&page=$2&sort=$3&order=$4 [I]
RewriteRule ^(.*)/exchange-([0-9]+)-([0-9]+)(.*)\.html$$1/exchange.php?cat_id=$2&page=$2[I]
RewriteRule ^(.*)/exchange-([0-9]+)(.*)\.html$$1/exchange.php?cat_id=$2[I]

上边这个就是iis的静态规则了

详见 安装doc文件夹里的URLRewrite.txt

首先谢谢楼上各位的热心帮助,现在问题解决了
今天早上联系上了他们的一个技术客服,他说未开启主机中的ISAP功能,帮我开启了之后,我的静态就OK了。

这个空间商就可以处理的

自己的服务器要怎么设置?