GitHub页面Jekyll使用应用程序/八位字节流作为内容类型重定向
我已经在github页面上实现了重定向,但出于某种原因,您的服务器正在为重定向页面返回“应用程序/八位字节流”的内容类型。这会导致浏览器不呈现重定向页面,因此生成的javascript无法执行以实际执行重定向 如何让响应头将text/html指定为内容类型,以便重定向工作 这是网址 以下是回应GitHub页面Jekyll使用应用程序/八位字节流作为内容类型重定向,jekyll,url-redirection,github-pages,Jekyll,Url Redirection,Github Pages,我已经在github页面上实现了重定向,但出于某种原因,您的服务器正在为重定向页面返回“应用程序/八位字节流”的内容类型。这会导致浏览器不呈现重定向页面,因此生成的javascript无法执行以实际执行重定向 如何让响应头将text/html指定为内容类型,以便重定向工作 这是网址 以下是回应 HTTP/1.1 200 OK Server: GitHub.com Content-Type: application/octet-stream Last-Modified: Sat, 06 Sep
HTTP/1.1 200 OK
Server: GitHub.com
Content-Type: application/octet-stream
Last-Modified: Sat, 06 Sep 2014 04:30:37 GMT
Expires: Sat, 06 Sep 2014 04:41:33 GMT
Cache-Control: max-age=600
Content-Length: 598
Accept-Ranges: bytes
Date: Sat, 06 Sep 2014 04:40:38 GMT
Via: 1.1 varnish
Age: 545
Connection: keep-alive
X-Served-By: cache-iad2132-IAD
X-Cache: MISS
X-Cache-Hits: 0
X-Timer: S1409978438.779912,VS0,VE2
Vary: Accept-Encoding
<!DOCTYPE html>
<meta charset=utf-8>
<title>Redirecting...</title>
<link rel=canonical href="http://www.pknopf.com/development/2013/03/07/Performance-CPP-CLI-vs-COM.html">
<meta http-equiv=refresh content="0; url=http://www.pknopf.com/development/2013/03/07/Performance-CPP-CLI-vs-COM.html">
<h1>Redirecting...</h1>
<a href="http://www.pknopf.com/development/2013/03/07/Performance-CPP-CLI-vs-COM.html">Click here if you are not redirected.</a>
<script>location='http://www.pknopf.com/development/2013/03/07/Performance-CPP-CLI-vs-COM.html'</script>
HTTP/1.1200正常
服务器:GitHub.com
内容类型:应用程序/八位字节流
最后修改:2014年9月6日星期六04:30:37 GMT
到期时间:2014年9月6日星期六04:41:33 GMT
缓存控制:最大年龄=600
内容长度:598
接受范围:字节
日期:2014年9月6日星期六04:40:38 GMT
通孔:1.1清漆
年龄:545
连接:保持活力
X服务方:cache-iad2132-IAD
X-Cache:小姐
X缓存命中率:0
X定时器:S1409978438.779912,VS0,VE2
改变:接受编码
重定向。。。
重定向。。。
地点:http://www.pknopf.com/development/2013/03/07/Performance-CPP-CLI-vs-COM.html'
如中所示,重定向URL需要尾部斜杠
在您的帖子中,您必须在重定向中添加尾部斜杠
例如:在\u posts/2013-03-07-Performance-CPP-CLI-vs-COM.md
redirect_from: "/blog/performance-ccli-vs-com"
变成:
redirect_from: "/blog/performance-ccli-vs-com/"