复制代码 代码如下:
<ifmodule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} blog.iflyhigher.tk$ [NC]
RewriteRule ^(.*)$ $1 [R=301,L]
RewriteCond %{HTTP_HOST} iflyhigher.tk$ [NC]
RewriteRule ^(.*)$ $1 [R=301,L]
RewriteCond %{HTTP_HOST} moiya.tk$ [NC]
RewriteRule ^(.*)$ $1 [R=301,L]
</ifmodule>
复制代码 代码如下:
RewriteCond %{HTTP_HOST} blog.iflyhigher.tk$ [NC]
RewriteRule ^(.*)$ $1 [R=301,L]
复制代码 代码如下:
<?php
$the_host = $_SERVER['HTTP_HOST'];
$request_uri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '';
switch ($the_host)
{
case "www.iflyhigher.tk":
case "iflyhigher.tk":
$location = "Location: " . $request_uri;
break;
case "blog.iflyhigher.tk":
$location = "Location: " . $request_uri;
break;
case "www.moiya.tk":
case "moiya.tk":
$location = "Location: ";
break;
default:
$location = "Location: ";
break;
}
header('HTTP/1.1 301 Moved Permanently');
header($location);
exit();
?>
复制代码 代码如下:
<?php
$the_host = $_SERVER['HTTP_HOST'];//取得进入所输入的域名
$request_uri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '';//判断后面的请求部分
if($the_host !== 'vevb.com')//vevb.com是我现在的域名
{
header('HTTP/1.1 301 Moved Permanently');//发出301头部
header('Location: '.$request_uri);//跳转到我的新域名地址
exit();
}
?>
新闻热点
疑难解答