伪静态规则有一点看不懂,求大牛稍作解析~

嘉文四世 发布于 2013/01/19 13:55
阅读 205
收藏 0

RewriteEngine On
RewriteRule ^(.*)/index.html$ $1/index.php
RewriteRule ^(.*)/(\w+).html$ $1/index.php?do=$2
RewriteRule ^(.*)/(\w+)-(\w+).html(.*) $1/index.php?$4&$2=$3 [QSA,L,NC]
RewriteRule ^(.*)/(\w+)-(\w+)-(\w+).html$ $1/index.php?do=$2&$3=$4
RewriteRule ^(.*)/(\w+)-(\w+)-(\w+)-(\w+).html(.*) $1/index.php?$6&$2=$3&$4=$5 [QSA,L,NC]
RewriteRule ^(.*)/(\w+)-(\w+)-(\w+)-(\w+)-(\w+).html$ $1/index.php?do=$2&$3=$4&$5=$6
RewriteRule ^(.*)/(\w+)-(\w+)-(\w+)-(\w+)-(\w+)-(\w+).html(.*) $1/index.php?$8&$2=$3&$4=$5&$6=$7 [QSA,L,NC]
RewriteRule ^(.*)/(\w+)-(\w+)-(\w+)-(\w+)-(\w+)-(\w+)-(\w+).html$ $1/index.php?do=$2&$3=$4&$5=$6&$7=$8

RewriteRule ^(.*)/(\w+)-(\w+)-(\w+)-(\w+)-(\w+)-(\w+)-(\w+)-(.*) $1/$9?do=$2&$3=$4&$5=$6&$7=$8 [C,NC]
RewriteRule ^(.*)/(\w+)-(\w+)-(\w+)-(\w+)-(\w+)-(\w+)-(\w+).html(.*)  $1/$8.html$9&$2=$3&$4=$5&$6=$7 [C,NC]
RewriteRule ^(.*)/(\w+)-(\w+)-(\w+)-(\w+)-(\w+)-(\w+)-(\w+).html(.*)  $1/$8.html$9&$2=$3&$4=$5&$6=$7 [C,NC]
RewriteRule ^(.*)/(\w+)-(\w+)-(\w+)-(\w+)-(\w+)-(\w+)-(\w+).html(.*)  $1/$8.html$9&$2=$3&$4=$5&$6=$7 [C,NC]
RewriteRule ^(.*)/.html(.*) $1/index.php$2 [QSA,L,NC]

apache伪静态,后面的能理解,红色的三行有点绕不过弯,向各位大牛求解释!!最后一段是超过9个参数以后用的,这个能说得通,那上面三句,没想通~

加载中
0
fzxu_05
fzxu_05

其实就是正则

返回顶部
顶部