域名同步 FOR 6.0

By | 十一月 20, 2007

include/common.inc.php


[php]error_reporting(0);
set_magic_quotes_runtime(0);[/php]

下加上

[code]
$domain = 'freetw.org'; //新域名
if ($_SERVER['HTTP_HOST'] != $domain) {
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://{$domain}{$_SERVER[REQUEST_URI]}");
}
unset($domain);

[/code]

您也會喜歡的文章

發表迴響