1

我正在尝试尽可能无缝地将 URL 重定向到另一个站点,并且我在站点的 htaccess 文件中使用以下内容:

重定向/durhamchapelhill http://gds.chapelhilluumc.org/

重定向有效,但生成的 URL 很乱:http ://gds.chapelhilluumc.org/?/durhamchapelhill

应该是: http: //gds.chapelhilluumc.org/

我可以对此使用一些输入。

谢谢

4

1 回答 1

1

根据评论更新了 .htaccess 内容

AddHandler php5-script .php

RewriteEngine On
RewriteBase /

RewriteRule ^durhamchapelhill$ http://gds.chapelhilluumc.org [R]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L] 
于 2013-02-27T06:05:55.463 回答