跳转页面的失效
失效图片展示
可以更换公益CDN 以下的是两条不同节点cdn css文件
如果看不懂的可以直接复制下面的代码粘贴到路径usr/themes/joe/module/goto.css文件
<?php
if (!defined('__TYPECHO_ROOT_DIR__') || empty($_SERVER['HTTP_HOST'])) {
http_response_code(404);
exit;
}
?>
<!DOCTYPE html>
<html lang='zh-CN'>
<head>
<meta name="referrer" content="no-referrer">
<title>即将跳转到外部网站 - <?= $this->options->title ?></title>
<meta content='noindex, nofollow' name='robots'>
<meta charset='utf-8'>
<link rel="shortcut icon" href="<?= $this->options->JFavicon ?>" />
<meta content='width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1.0, user-scalable=no' name='viewport'>
<link rel="stylesheet" media="all" href="https://file.bl01.cn/CDN/css/goto.css" />
</head>
<body>
<div class='gitee-external-link-wrapper'>
<img class="logo-img" src="<?= $this->options->JLogo ?>" alt="Logo black" />
<div class='content-box'>
<div class='content-title'>即将跳转到外部网站</div>
<div class='content-text'>您将要访问的链接不属于 <?= $this->options->title ?> ,请关注您的账号安全。</div>
<div class='content-link'>
<div class='external-link-href'></div>
</div>
<div style="background:#409eff" class='ui button orange external-link-btn'>继续前往</div>
</div>
</div>
</body>
</html>
<script>
window.is_black = false;
(function() {
var e = document.querySelector(".external-link-href");
var t = window.atob(new URLSearchParams(location.search).get("url"));
if (t && (e.innerText = t, !window.is_black)) {
var n = document.querySelector(".external-link-btn");
n && n.addEventListener("click", function() {
window.location.href = t
})
}
}());
</script>
第一个是美国节点
第二个是上海节点
<link rel="stylesheet" media="all" href="https://file.bl01.cn/CDN/css/goto.css" />
<link rel="stylesheet" media="all" href="https://cdn.01kl.cn/CDN/css/goto.css" />
本地版
优点稳定 缺点小型服务器加载慢
会的可以自己二开
不会的直接复制下面的代码粘贴到路径usr/themes/joe/module/goto.css文件
<?php
if (!defined('__TYPECHO_ROOT_DIR__') || empty($_SERVER['HTTP_HOST'])) {
http_response_code(404);
exit;
}
// 获取目标URL
$target = $_GET['url'] ?? '';
$decoded = '';
if ($target) {
// 安全解码Base64
$decoded = base64_decode(str_pad(strtr($target, '-_', '+/'), strlen($target) % 4, '='));
// 验证URL格式
if (!filter_var($decoded, FILTER_VALIDATE_URL)) {
$decoded = '无效的URL格式';
}
}
?>
<!DOCTYPE html>
<html lang='zh-CN'>
<head>
<meta name="referrer" content="no-referrer">
<title>即将跳转到外部网站 - <?= $this->options->title ?></title>
<meta content='noindex, nofollow' name='robots'>
<meta charset='utf-8'>
<link rel="shortcut icon" href="<?= $this->options->JFavicon ?>" />
<meta content='width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1.0, user-scalable=no' name='viewport'>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
background: #f5f7fa;
margin: 0;
padding: 20px;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
}
.redirect-box {
background: white;
border-radius: 12px;
box-shadow: 0 5px 20px rgba(0,0,0,0.1);
max-width: 500px;
width: 100%;
overflow: hidden;
}
.logo-container {
background: #409eff;
padding: 25px;
text-align: center;
}
.logo-img {
height: 50px;
}
.content-box {
padding: 30px;
}
.content-title {
font-size: 22px;
font-weight: bold;
color: #333;
margin-bottom: 15px;
}
.content-text {
color: #f56c6c;
background: #fef0f0;
padding: 12px 15px;
border-radius: 6px;
margin-bottom: 20px;
border-left: 4px solid #f56c6c;
}
.content-link {
background: #f8f9fa;
border: 1px solid #ebeef5;
border-radius: 6px;
padding: 15px;
margin-bottom: 25px;
word-break: break-all;
font-size: 15px;
color: #606266;
}
.external-link-btn {
display: block;
width: 100%;
padding: 14px;
background: #409eff;
color: white;
border: none;
border-radius: 6px;
font-size: 16px;
font-weight: 500;
cursor: pointer;
text-align: center;
transition: background 0.3s;
}
.external-link-btn:hover {
background: #66b1ff;
}
.countdown {
text-align: center;
margin-top: 15px;
color: #909399;
font-size: 14px;
}
</style>
</head>
<body>
<div class='redirect-box'>
<div class="logo-container">
<img class="logo-img" src="<?= $this->options->JLogo ?>" alt="Logo" />
</div>
<div class='content-box'>
<div class='content-title'>即将跳转到外部网站</div>
<div class='content-text'>您将要访问的链接不属于 <?= $this->options->title ?>,请关注您的账号安全。</div>
<div class='content-link' id="targetUrl">
<?= htmlspecialchars($decoded ?: '未提供有效跳转链接') ?>
</div>
<?php if ($decoded && filter_var($decoded, FILTER_VALIDATE_URL)): ?>
<button class='external-link-btn' id="redirectBtn">继续前往</button>
<div class="countdown">将在 <span id="countdown">5</span> 秒后自动跳转</div>
<?php else: ?>
<button class='external-link-btn' style="background: #909399" disabled>无法跳转</button>
<?php endif; ?>
</div>
</div>
<script>
<?php if ($decoded && filter_var($decoded, FILTER_VALIDATE_URL)): ?>
// 倒计时自动跳转
var count = 5;
var countdownEl = document.getElementById('countdown');
var timer = setInterval(function() {
count--;
countdownEl.textContent = count;
if (count <= 0) {
clearInterval(timer);
window.location.href = "<?= $decoded ?>";
}
}, 1000);
// 手动跳转
document.getElementById('redirectBtn').addEventListener('click', function() {
clearInterval(timer);
window.location.href = "<?= $decoded ?>";
});
<?php endif; ?>
</script>
</body>
</html>
作者介绍
作者:白泽
版权:白泽
邮箱:aying1019@163.com
QQ:3105919063
有问题可联系邮箱或者点击关于加好友咨询
然后就是服务器的本地优化了这里可以看往期链接在下
Typecho的Joe模板那些更可以替换静态资源cdn优化运行速度和承载量
typecho博客Joe模板以及其他模板通用优化教程,适用所有主题
BBR 需要内核4.9以上 2025年最新的教程来了 之前的大部分是用不了的看最新的这个吧! 4天前发布 / 未收录,已推送
感谢
虽然看不懂,但是感觉好屌![$[阿鲁表情]::(口水)](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
太吊了,完美解决我网站的问题,什么你说我的网站是哪个?那我就告诉你吧。blog.sskj01.com![$[阿鲁表情]::(脸红)](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
![$[阿鲁表情]::(脸红)](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
![$[阿鲁表情]::(赞一个)](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)