[提问]
求助:httpd.ini 转 web.config 正则
|
|
从论坛这边介绍,买了个Godaddy的windows空间。程序是PHP,之前用windows II6 使用 httpd.ini 重写,但是换了godaddy空间是用IIS7的。客服说只能用web.config 才能重写,但是自己又对规则不懂。希望得到大师们的帮助,我把我们之前用的httpd.ini贴出来,大师们帮忙下,任何的回复都将万分感谢:
[ISAPI_Rewrite]
# 300 = 5 minutes
CacheClockRate 300
RepeatLimit 20
# php RewriteRule
RewriteRule /productlist.html /productlist.php
RewriteRule /more-([_a-zA-Z0-9-]*).html /more.php?id=$1
RewriteRule /productlist-one-([0-9]+).html /productlist.php?tid=$1
RewriteRule /productlist-two-([0-9]+).html /productlist.php?fid=$1
RewriteRule /productlist-three-([0-9]+)-([0-9]+).html /productlist.php?fid=$1&cid=$2
RewriteRule /productlist-([0-9]*)-([0-9]*)-([0-9]*)-([0-9]*)-([0-9]*)-([0-9]*).html /productlist.php?tid=$1&fid=$2&cid=$3&way=$4&keyword=$5&page=$6
RewriteRule /productlist-brand-([0-9]+).html /productlist.php?tbrand=$1
RewriteRule /productlist-brand-([0-9]+)-([0-9]+).html /productlist.php?tbrand=$1&fbrand=$2
RewriteRule /productlist-brand-([0-9]*)-([0-9]*)-([0-9]*).html /productlist.php?tbrand=$1&fbrand=$2&page=$3
RewriteRule /product_detail-([0-9]+).html /product_detail.php?id=$1
RewriteRule /about-([0-9]+).html /about.php?hid=$1
RewriteRule /prodtl.html /prodtl.php
RewriteRule /newslist-t1-([0-9]+).html /newslist.php?tid=$1
RewriteRule /news-([0-9]+).html /news.php?id=$1
RewriteRule /prodtl-([_a-zA-Z0-9-]*)-t1-([0-9]+).html /prodtl.php?listnf=$1&tid=$2
RewriteRule /prodtl-([_a-zA-Z0-9-]*)-([_a-zA-Z0-9-]*)-f2-([0-9]+).html /prodtl.php?listnf=$1&listns=$2&fid=$3
RewriteRule /prodtl-([_a-zA-Z0-9-]*)-([_a-zA-Z0-9-]*)-f2-([0-9]+)-c3-([0-9]+).html /prodtl.php?listns=$1&listnc=$2&fid=$3&cid=$4
#RewriteRule /prodtl-([0-9]*)-f2-([0-9]*)-c3-([0-9]*)-([0-9]*)-([0-9]*)-([0-9]*).html /prodtl.php?tid=$1&fid=$2&cid=$3&way=$4&keyword=$5&page=$6
RewriteRule /prodtl-([0-9]*)-f2-([0-9]*)-c3-([0-9]*)-([_a-zA-Z0-9-]*)-([_a-zA-Z0-9-]*)-([0-9]*).html /prodtl.php?tid=$1&fid=$2&cid=$3&way=$4&keyword=$5&page=$6
RewriteRule /prodts-([_a-zA-Z0-9-]*)-([_a-zA-Z0-9-]*)-k3-([_a-zA-Z0-9-]*)-p-([0-9]+).html /prodts.php?listnf=$1&listns=$2&listnp=$3&id=$4
RewriteRule /prodts-k1-([_a-zA-Z0-9-]*)-([_a-zA-Z0-9-]*)-([_a-zA-Z0-9-]*)-p-([0-9]+).html /prodts.php?listns=$1&listnc=$2&listnp=$3&id=$4
RewriteRule /([_a-zA-Z0-9-]*)-([_a-zA-Z0-9-]*).htm /$1.php?page=$2
RewriteRule /([_a-zA-Z0-9-]*).html /$1.php
RewriteCond Host: ^idcspy\.com$
RewriteRule (.*) http\://www\.idcspy\.com$1 [R,I] |
|
|
|
|
|
|
|
|