3 ms·
On a similar note, my blog is hosted on github pages. Due to laziness and inertia I've kinda just left it there as it just works, but the lack of control makes
by djhworld 6y ago
On a similar note, my blog is hosted on github pages.
Due to laziness and inertia I've kinda just left it there as it just works, but the lack of control makes me uneasy.
So at some point I want to move it, hosted by myself (with CDN) and under my own domain. Except all the links that people have used to link to my GH pages blog are still out there and I'm not sure how to cleanly redirect visitors to my own hosted version of the blog.
window.location hack? Has anyone else done this (I appreciate my lack of foresight on my behalf is a problem of my own making...)
- karagenit 6y agoWell, if it stays as a static site, you could always set your server to push any changes to GitHub as well, so you effectively keep your GitHub pages site up as a mirror of your personal domain. You could also make all of your navigation links absolute links that redirect to your new domain. Or, like you suggested, make a skeleton site out of the current version of the site where each page just has a bit of JS to redirect a visitor.
- pbhjpbhj 6y agoOr use a meta "redirect", https://stackoverflow.com/questions/5411538/redirect-from-an-html-page https://stackoverflow.com/questions/5411538/redirect-from-an..., assuming they are able to write to the head-tag.
- fenwick67 6y agoIf you set up a custom domain in github pages, it will redirect to it automatically, even if the page doesn't exist. https://fenwick67.github.io/some/dir/ https://fenwick67.github.io/some/dir/ automatically redirects to https://fenwick.pizza/some/dir/ https://fenwick.pizza/some/dir/ .