htaccess 换换成 iis 伪静态问题

2017-09-07 14:46:39 +08:00
 futurejunjie
公司给我一个伪静态文.htaccess,网站是 asp 的,我在 iis7.5 重写工具里转换的时候提示出错。
无法将该规则集转换为等效的 iis 格式,因为不支持控制流标记( C、S、N )

以下是.htaccess 文件
[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP

RewriteRule /m/index.html /m/index.asp

RewriteRule /m/about.html /m/about.asp
RewriteRule /m/about(\d+)\.html /m/about\.asp\?wid=$1

RewriteRule /m/service.html /m/service.asp
RewriteRule /m/service(\d+)\.html /m/service\.asp\?wid=$1

RewriteRule /m/guestbook.html /m/guestbook.asp

RewriteRule /m/job.html /m/job.asp

RewriteRule /m/qqonline.html /m/qqonline.asp


RewriteRule /m/news.html /m/news.asp
RewriteRule /m/newslist.html /m/newslist.asp
RewriteRule /m/newslist(\d+)_(\d+)\.html /m/newslist\.asp\?newsclassid=$1&newsid=$2 [N,I]
RewriteRule /m/newslist(\d+)\.html /m/newslist\.asp\?newsclassid=$1
RewriteRule /m/newslist_(\d+)_(\d+)\.html /m/newslist\.asp\?newsclassid=$1&page=$2 [N,I]


RewriteRule /m/solutionslb.html /m/solutionslb.asp
RewriteRule /m/solutions.html /m/solutions.asp
RewriteRule /m/solutions(\d+)_(\d+)\.html /m/solutions\.asp\?newsclassid=$1&newsid=$2 [N,I]
RewriteRule /m/solutions(\d+)\.html /m/solutions\.asp\?newsclassid=$1
RewriteRule /m/solutions_(\d+)_(\d+)\.html /m/solutions\.asp\?newsclassid=$1&page=$2 [N,I]


RewriteRule /m/case.html /m/case.asp
RewriteRule /m/case(\d+)_(\d+)\.html /m/case\.asp\?newsclassid=$1&newsid=$2 [N,I]
RewriteRule /m/case(\d+)\.html /m/case\.asp\?newsclassid=$1
RewriteRule /m/case_(\d+)_(\d+)\.html /m/case\.asp\?newsclassid=$1&page=$2 [N,I]


RewriteRule /m/download.html /m/download.asp
RewriteRule /m/download(\d+)\.html /m/download\.asp\?downloadid=$1
RewriteRule /m/download_(\d+)_(\d+)\.html /m/download\.asp\?downloadid=$1&page=$2 [N,I]


RewriteRule /m/productlb.html /m/productlb.asp
RewriteRule /m/product.html /m/product.asp
RewriteRule /m/productshow(\d+)_(\d+)\.html /m/productshow\.asp\?Parentid=$1&ProdNum=$2 [N,I]
RewriteRule /m/product(\d+)\.html /m/product\.asp\?Parentid=$1
RewriteRule /m/product_(\d+)_(\d+)\.html /m/product\.asp\?Parentid=$1&page=$2 [N,I]




RewriteRule /index.html /index.asp

RewriteRule /about.html /about.asp
RewriteRule /about(\d+)\.html /about\.asp\?wid=$1

RewriteRule /service.html /service.asp
RewriteRule /service(\d+)\.html /service\.asp\?wid=$1

RewriteRule /guestbook.html /guestbook.asp

RewriteRule /job.html /job.asp

RewriteRule /qqonline.html /qqonline.asp


RewriteRule /news.html /news.asp
RewriteRule /newslist.html /newslist.asp
RewriteRule /newslist(\d+)_(\d+)\.html /newslist\.asp\?newsclassid=$1&newsid=$2 [N,I]
RewriteRule /newslist(\d+)\.html /newslist\.asp\?newsclassid=$1
RewriteRule /newslist_(\d+)_(\d+)\.html /newslist\.asp\?newsclassid=$1&page=$2 [N,I]


RewriteRule /solutions.html /solutions.asp
RewriteRule /solutionshow(\d+)_(\d+)\.html /solutionsshow\.asp\?newsclassid=$1&newsid=$2 [N,I]
RewriteRule /solutions(\d+)\.html /solutions\.asp\?newsclassid=$1
RewriteRule /solutions_(\d+)_(\d+)\.html /solutions\.asp\?newsclassid=$1&page=$2 [N,I]


RewriteRule /case.html /case.asp
RewriteRule /case(\d+)_(\d+)\.html /case\.asp\?newsclassid=$1&newsid=$2 [N,I]
RewriteRule /case(\d+)\.html /case\.asp\?newsclassid=$1
RewriteRule /case_(\d+)_(\d+)\.html /case\.asp\?newsclassid=$1&page=$2 [N,I]


RewriteRule /download.html /download.asp
RewriteRule /download(\d+)\.html /download\.asp\?downloadid=$1
RewriteRule /download_(\d+)_(\d+)\.html /download\.asp\?downloadid=$1&page=$2 [N,I]

RewriteRule /mall.html /mall.asp

RewriteRule /product.html /product.asp
RewriteRule /productshow(\d+)_(\d+)\.html /productshow\.asp\?larseq=$1&ProdNum=$2 [N,I]
RewriteRule /product(\d+)\.html /product\.asp\?Parentid=$1
RewriteRule /product_(\d+)_(\d+)\.html /product\.asp\?Parentid=$1&page=$2 [N,I]
RewriteRule /(.+)\.html /productshow\.asp\?model=$1
2391 次点击
所在节点    问与答
0 条回复

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/388920

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX