WordPress代码:给网站添加外链go跳转效果禁止外链权重

代码方法

代码部署

①、新建一个go.php文件,放置到wordpress的根目录下,在go.php里面输入以下代码
这是知更鸟的go.php代码

<?php   
// http://www.haogew.cn/  $t_url = preg_replace('/^url=(.*)$/i','$1',$_SERVER["QUERY_STRING"]);  if(!emptyempty($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='http://www.haogew.cn/';  
            $title='参数错误,正在返回首页...';  
        }  
    }  } else {  
    $title='参数缺失,正在返回首页...';  
    $url='http://www.haogew.cn/';  }  ?>  <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>  <style>  body{background:#000}.loading{-webkit-animation:fadein 2s;-moz-animation:fadein 2s;-o-animation:fadein 2s;animation:fadein 2s}@-moz-keyframes fadein{from{opacity:0}to{opacity:1}}@-webkit-keyframes fadein{from{opacity:0}to{opacity:1}}@-o-keyframes fadein{from{opacity:0}to{opacity:1}}@keyframes fadein{from{opacity:0}to{opacity:1}}.spinner-wrapper{position:absolute;top:0;left:0;z-index:300;height:100%;min-width:100%;min-height:100%;background:rgba(255,255,255,0.93)}.spinner-text{position:absolute;top:50%;left:50%;margin-left:-90px;margin-top: 2px;color:#BBB;letter-spacing:1px;font-weight:700;font-size:36px;font-family:Arial}.spinner{position:absolute;top:50%;left:50%;display:block;margin-left:-160px;width:1px;height:1px;border:25px solid rgba(100,100,100,0.2);-webkit-border-radius:50px;-moz-border-radius:50px;border-radius:50px;border-left-color:transparent;border-right-color:transparent;-webkit-animation:spin 1.5s infinite;-moz-animation:spin 1.5s infinite;animation:spin 1.5s infinite}@-webkit-keyframes spin{0%,100%{-webkit-transform:rotate(0deg) scale(1)}50%{-webkit-transform:rotate(720deg) scale(0.6)}}@-moz-keyframes spin{0%,100%{-moz-transform:rotate(0deg) scale(1)}50%{-moz-transform:rotate(720deg) scale(0.6)}}@-o-keyframes spin{0%,100%{-o-transform:rotate(0deg) scale(1)}50%{-o-transform:rotate(720deg) scale(0.6)}}@keyframes spin{0%,100%{transform:rotate(0deg) scale(1)}50%{transform:rotate(720deg) scale(0.6)}}  </style>  </head>  <body>  <div class="loading">  
  <div class="spinner-wrapper">  
    <span class="spinner-text">页面加载中,请稍候...</span>  
    <span class="spinner"></span>  
  </div>  </div>  </body>  </html>

使用方法

②、保存,则外链跳转形式为: {本站地址}/go.php?{外链地址}
使用:在添加外链的时候,只要给外链加上统一的跳转前缀:http://网站地址/go.php?  即可。


外链方法的使用是需要在手动添加外链的,同时跳转样式可以自行修改。

插件实现

有些插件也能实现这个外链跳转
1. Simple URLs插件
设置简单,只需要要后台设置好后缀和目标页面即可
2. Link-Hopper插件
跳转链接的基础地址可以随意设置
3. Pretty Link Lite插件
后台功能十分强大的,还有Pro版本,不过要money的。用它完全可以做一个短网址,像t.cn和bit.ly一样。
4. Affiliate Link Cloaking插件
推广链接转换工具,用来推广你的淘宝客等要隐藏的链接,可以使用它,附带统计功能。
5. WP No External Links插件
这个一款可以自动将博客内的外部链接转成内部链接,如http://www.baidu.com,则显示为http://www.haogew.cn/goto/http://www.baidu.com,可以尝试使用这个插件防权重丢失的。
6. Go Codes插件
和前面的wordpress外链跳转链接插件设置一样简单,带统计功能。


插件具体使用与否可以自己尝试,这里不做太多解释,也不对插件对错负责。

好歌资源网,欢迎分享,欢迎评论,(开通PLUS会员资源免费下 )本站积分兑换是1RMB:1金币。
©下载资源版权归作者所有;本站所有资源均来源于网络和用户上传,仅供学习使用,请支持正版
好歌源码网 » WordPress代码:给网站添加外链go跳转效果禁止外链权重

发表回复

提供最优质的网赚资源集合分享平台

立即查看 了解详情
bikini hot girl bigztube.mobi porn hub new
magandang camera ng cellphone teleseryena.com pvl all filipino conference schedule
سكس فلاح مصرى yatarab.com سكي امهات
tamil local kuthu songs fuckster.mobi india xxx hd com
indian defloration dunato.mobi village bath scene
abot kamay na pangarap dec 2 akoypinoytv.net ang probinsyano december 14 2015
mani4u porncorn.info xoossip
نيك في العربية bendito-porno.com نيك جماعى
abot kamay na pangarap oct 13 2022 teleseryestv.com tinutulan
big fat sex indianhardfuck.net sexy film janwar wali
xxx in indian fukando.mobi hindi sxi video
hotsouthindiansex.com pornofantasy.info mom and son xnxxx
fucking girl video porndig.mobi rubfuck.com
hentai smash bros hentairulz.com sakimi chan hentai
big tiddy onee san hentai4all.com yukari yakumo hentai