Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于 Hexo 上传 404 页面的问题 #2411

Closed
He110te4m opened this issue Feb 19, 2017 · 6 comments
Closed

关于 Hexo 上传 404 页面的问题 #2411

He110te4m opened this issue Feb 19, 2017 · 6 comments

Comments

@He110te4m
Copy link

问题描述

将 404 页面放入 Hexo 下的 Source 目录下,但是上传到 Git Pages 之后这个页面打不开了,已经确定文件名无误,路径地址也无误,并没有显示 404 页面而是跳转到留言板页面

@He110te4m
Copy link
Author

在本地 public 文件夹中预览无误,但是上传后就显示不出来了
36 n_5s2z9_ cvnkp l o
ecqdgkqk7zx bt_n _fao6f

@He110te4m
Copy link
Author

He110te4m commented Feb 19, 2017

找到问题了,是因为腾讯公益不支持 https,所以被拦截了,将代码修改为:

<!DOCTYPE HTML>
<html>
<head>
  <meta http-equiv="content-type" content="text/html;charset=utf-8;"/>
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  <meta name="robots" content="all" />
  <meta name="robots" content="index,follow"/>
</head>
<body>

<script type="text/plain" src="http://www.qq.com/404/search_children.js"
        charset="utf-8" homePageUrl="/"
        homePageName="回到我的主页">
</script>
<script src="https://qzone.qq.com/gy/404/data.js" charset="utf-8"></script>
<script src="https://qzone.qq.com/gy/404/page.js" charset="utf-8"></script>

</body>
</html>

即可,但是这样有个问题: ** CSS 样式加载不出来 **,正在寻找解决方法中

@YuleYu
Copy link

YuleYu commented Feb 27, 2017

是因为现在 chrome 只支持加载经过 https 的 CSS 的原因吗?
我搜了一下还是有办法的:使腾讯404公益页面支持HTTPS

@iissnan
Copy link

iissnan commented Feb 27, 2017

<!DOCTYPE HTML>
<html>
<head>
  <meta http-equiv="content-type" content="text/html;charset=utf-8;"/>
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  <meta name="robots" content="all" />
  <meta name="robots" content="index,follow"/>
  <link rel="stylesheet" type="text/css" href="https://qzone.qq.com/gy/404/style/404style.css" > 
</head>
<body>

<script type="text/plain" src="http://www.qq.com/404/search_children.js"
        charset="utf-8" homePageUrl="/"
        homePageName="回到我的主页">
</script>
<script src="https://qzone.qq.com/gy/404/data.js" charset="utf-8"></script>
<script src="https://qzone.qq.com/gy/404/page.js" charset="utf-8"></script>

</body>
</html>

@He110te4m
Copy link
Author

@iissnan 这么写不行,
default
加载不出样式,我后来就是这么写的,加载样式 304
default

@He110te4m
Copy link
Author

@YuleYu 感谢,解决了
default

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants