关于伪静态的正则表达式的写法
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
这样子不行额。 展开
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
这样子不行额。 展开
1个回答
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]
基本没变化
============
你自己也调试一下嘛! 别懒得连手不动啊! 呵呵,自己多调试一下,学到手才是技术!
# 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]
基本没变化
============
你自己也调试一下嘛! 别懒得连手不动啊! 呵呵,自己多调试一下,学到手才是技术!
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询