apache重定向问题

时间:2010-09-10 20:09:23

标签: apache redirect

我想做的是无论用户输入什么内容,都会重定向到index.php。

这就是我在这里说的吗?

Options +FollowSymLinks
RewriteEngine On

RewriteBase /
RewriteCond $0 !=index.php

RewriteRule .* index.php?path=$0 [QSA,B]

1 个答案:

答案 0 :(得分:0)

不是,这是重写的相关代码:

RewriteEngine On
RewriteBase /
RewriteCond ${REQUEST_URI} !^/index.php$
RewriteRule ^(.*)$ index.php?path=$1 [QSA,B,L]