Home 網站架設DISCUZ 域名同步 FOR 6.0

域名同步 FOR 6.0

by admin

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]

related posts

Leave a Comment