外链想必大家都不陌生吧
那如何做站内外链跳转优化哪?
自己动手丰衣足食,首先创建一个go.php(名字可以自定义)文件,在go.php里面输入以下代码(记得修改代码中的域名blog.xuelg.com改为你自己的域名),然后上传到网站根目录下。
<?php
$t_url=$_GET['url'];
if(!empty($t_url)) {
    preg_match('/(http|https):\/\//',$t_url,$matches);
    if($matches){
        $url=$t_url;
        $title='页面跳转中,请稍候...';
    } else {
        preg_match('/\./i',$t_url,$matche);
        if($matche){
            $url='http://'.$t_url;
            $title='页面跳转中,请稍候...';
        } else {
            $url='https://blog.xuelg.com/';
            $title='参数错误,正在返回首页...';
        }
    }
} else {
    $title='参数缺失,正在返回首页...';
    $url='http://blog.xuelg.com/';
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="refresh" content="1;url='<?php echo $url;?>';">
<title><?php echo $title;?></title>
</head>
</html>在添加外链的时候,只要给外链加上统一的跳转前缀:http://你的域名/go.php?url=要跳转到的地址,即可实现外链跳转效果。
			本文由 血莲聆空 创作,采用 知识共享署名4.0 国际许可协议进行许可
本站文章除注明转载/出处外,均为本站原创或翻译,转载前请务必署名
最后编辑时间为: 2020年03月13日 11:56:52		
 
                    
SEO
所以为什么要外链跳转。。。
大是大非