转自http://www.r00ts.info/

修改Boblog安装目录下的global.php,在最前面的第一行下面添加以下代码:

if (strtolower($_SERVER['SERVER_NAME'])!='lvjin.job.sh'){

$URIRedirect=$_SERVER['REQUEST_URI'];

if(strtolower($URIRedirect)=="/index.php"){

$URIRedirect="/"; }

header('HTTP/1.1 301 Moved Permanently');

header('Location:http://lvjin.job.sh'.$URIRedirect);

exit();

}

修改后的完整代码:

<?PHP if (strtolower($_SERVER['SERVER_NAME'])!='lvjin.job.sh'){

$URIRedirect=$_SERVER['REQUEST_URI'];

if(strtolower($URIRedirect)=="/index.php"){

$URIRedirect="/"; }

header('HTTP/1.1 301 Moved Permanently');

header('Location:http://lvjin.job.sh'.$URIRedirect);

exit();

}

/* -----------------------------------------------------

Bo-Blog 2 : The Blog Reloaded.

<>

PHP+MySQL blog system.

Offical site: http://www.bo-blog.com

Copyright (c) Bob Shen 中国-上海

In memory of my university life

对比修改前的代码

<?PHP

/* -----------------------------------------------------

Bo-Blog 2 : The Blog Reloaded.

<
>

PHP+MySQL blog system.

Offical site: http://www.bo-blog.com

Copyright (c) Bob Shen 中国-上海

In memory of my university life

当然,上面讲的是在IIS下的。

不支持自写.htaccess

好吧,我承认我失败了。

我的是LINUX的。

用的Apache。

Comments
Write a Comment