GitHub Pages Jekyll redirect using application / octet-stream as content type
I have implemented a redirect on github pages, but for some reason your servers are returning content type "application / octet-stream" for redirect pages. This causes the browser to not render redirect pages, so the executable javascript element does not redirect.
How can I get the response headers so that the text / html is specified as content type in order to work with the redirect?
Here is the URL.
http://www.pknopf.com/blog/performance-ccli-vs-com
Here's the answer.
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>
+3
source to share
1 answer
As you can see in jekyll redirect from the documentation , URL redirects require a trailing slash.
In your posts, you MUST add a trailing slash in your redirects.
for example: in _posts / 2013-03-07-Performance-CPP-CLI-vs-COM.md
redirect_from: "/blog/performance-ccli-vs-com"
becomes:
redirect_from: "/blog/performance-ccli-vs-com/"
+3
source to share