RewriteEngine OnRewriteCond %{REQUEST_URI} ^/abc
RewriteRule .* test1/index.phpRewriteRule .* test/index.php不是相当于下的例子吗?
if($_SERVER['REQUEST_URI']=='/abc'){
header("location:test1/index.php");
}else{
header("location:test/index.php");
}为什么正规式,不起作用呢?非常疑惑~~~~~~~~~~~~~
RewriteRule .* test1/index.phpRewriteRule .* test/index.php不是相当于下的例子吗?
if($_SERVER['REQUEST_URI']=='/abc'){
header("location:test1/index.php");
}else{
header("location:test/index.php");
}为什么正规式,不起作用呢?非常疑惑~~~~~~~~~~~~~
不能去test1/index.php
.*表示所有的,都转走了。就不会执行下一行了
RewriteRule .* test/index.php
RewriteCond %{REQUEST_URI} ^/abc
RewriteRule .* test1/index.php
RewriteCond %{REQUEST_URI} !^/abc
RewriteRule .* test/index.php