4 ms·
There actually is a way to redirect requests on GitHub Pages. It's a bit hacky, but if you want to stick with GitHub's hosting, it might be worth doing. You ca
by fjw 14y ago
There actually is a way to redirect requests on GitHub Pages. It's a bit hacky, but if you want to stick with GitHub's hosting, it might be worth doing.
You can manually create a new page "index.html" in the corresponding subdirectory for your redirect. If you want /post/oops-i-made-a-tpyo to redirect to your updated oops-i-made-a-typo link, you would create /post/oops-i-made-a-tpyo/index.html and make an HTML redirect:
<meta http-equiv="refresh" content="0;url=/post/oops-i-made-a-typo/" />
You can see this at work on my blog [1] and the code for the redirects I made [2] when migrating from Tumblr.
[1] http://frankjwu.com/ http://frankjwu.com/
[2] https://github.com/frankjwu/frankjwu.github.com/tree/master/post https://github.com/frankjwu/frankjwu.github.com/tree/master/...