域名同步 FOR 6.0 - 軟體部落

域名同步 FOR 6.0

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]

Tags:

發表迴響