关于伪静态的正则表达式的写法

Options-IndexesRewriteEngineonRewriteRule^viewimg/(\d+)\.jpg/viewimg\.php?$1[L]Rewrit... Options -Indexes
RewriteEngine on
RewriteRule ^viewimg/(\d+)\.jpg /viewimg\.php?$1 [L]
RewriteRule ^([a-z]+)/(\d{5,11})\.html? /index\.php?action=$1&qq=$2 [L]
RewriteRule ^([a-z]+)/(\d{5,11})-([^\/]+)(?:\/([^\/]+)\/([^\/]+))?(?:\/([^\/]+)\/([^\/]+))?(?:\/([^\/]+)\/([^\/]+))?\.html? /index\.php?action=$1&qq=$2&id=$3&$4=$5&$6=$7&$8=$9 [L]
RewriteRule ^([a-z]+)\.html? /index\.php?action=$1 [L]
RewriteRule ^music-audition/(\d+)\.html? /index\.php?action=audition&id=$1 [L]
RewriteRule ^([a-z]+)-article/(\d+)\.html? /index\.php?action=$1&did=$2 [L]
RewriteRule ^([a-z]+)/cache/(\d{5,11})(?:\/([^\/]+)\/([^\/]+))?(?:\/([^\/]+)\/([^\/]+))?(?:\/([^\/]+)\/([^\/]+))?\.html? /index\.php?action=$1&cache=$2&$3=$4&$5=$6&$7=$8 [L]
RewriteRule ^so/([a-z]+)\.html? /index\.php?action=so_$1 [L]
RewriteRule ^(so_[a-z]+)(?:\/([^\/]+)\/([^\/]+))?(?:\/([^\/]+)\/([^\/]+))?(?:\/([^\/]+)\/([^\/]+))?\.html? /index\.php?action=$1&$2=$3&$4=$5&$6=$7 [L]
这个是.htaccess文件的写法,我想换成iis的rewrite,谁能帮忙改写下?正确加满分,不行就帮忙写一条吧。
回答者: 匿名 2010-3-23 16:4
这样子不行额。
展开
 我来答
匿名用户
2010-03-24
展开全部
[ISAPI_Rewrite]

# 3600 = 1 hour
CacheClockRate 3600

RepeatLimit 32

# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP
RewriteRule ^viewimg/(\d+)\.jpg /viewimg\.php?$1 [L]
RewriteRule ^([a-z]+)/(\d{5,11})\.html? /index\.php?action=$1&qq=$2 [L]
RewriteRule ^([a-z]+)/(\d{5,11})-([^\/]+)(?:\/([^\/]+)\/([^\/]+))?(?:\/([^\/]+)\/([^\/]+))?(?:\/([^\/]+)\/([^\/]+))?\.html? /index\.php?action=$1&qq=$2&id=$3&$4=$5&$6=$7&$8=$9 [L]
RewriteRule ^([a-z]+)\.html? /index\.php?action=$1 [L]
RewriteRule ^music-audition/(\d+)\.html? /index\.php?action=audition&id=$1 [L]
RewriteRule ^([a-z]+)-article/(\d+)\.html? /index\.php?action=$1&did=$2 [L]
RewriteRule ^([a-z]+)/cache/(\d{5,11})(?:\/([^\/]+)\/([^\/]+))?(?:\/([^\/]+)\/([^\/]+))?(?:\/([^\/]+)\/([^\/]+))?\.html? /index\.php?action=$1&cache=$2&$3=$4&$5=$6&$7=$8 [L]
RewriteRule ^so/([a-z]+)\.html? /index\.php?action=so_$1 [L]
RewriteRule ^(so_[a-z]+)(?:\/([^\/]+)\/([^\/]+))?(?:\/([^\/]+)\/([^\/]+))?(?:\/([^\/]+)\/([^\/]+))?\.html? /index\.php?action=$1&$2=$3&$4=$5&$6=$7 [L]

基本没变化

============
你自己也调试一下嘛! 别懒得连手不动啊! 呵呵,自己多调试一下,学到手才是技术!
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式