1

我在 htaccess 文件中有以下代码。我想通过站点重定向到另一个 url。例如http://abc.com/index.php_http://abc.com/beta/index.php

<IfModule mod_rewrite.c>
     RewriteEngine On
  RewriteBase /
 RewriteRule ^index\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteRule . /index.php [L]
 </IfModule>

RewriteRule ^mp/?$ /mp/index.php [L]

我怎样才能重定向它?

谢谢

4

2 回答 2

0

您只需要这样一条规则:

RewriteRule (?!^beta(/.*|)$)^.*$ beta%{REQUEST_URI} [R,L,NC]
于 2012-05-02T16:53:48.723 回答
0

尝试将以下规则添加到块的底部:

RewriteCond %{REQUEST_URI} !^beta
RewriteRule ^(.*)$ /beta/$1 [L]
于 2012-05-02T16:45:11.547 回答