baseurl and 301s
We'd like to be able to set baseurl so that we can host the blog using shared hostnames (e.g., godaddy.com).
As part of setting baseurl, we also need to add 301 logic for existing post URLs (so that those links don't break).
You will want to update the _config.yml file and:
- Add a
baseurl: '/your/path/here'definition. - Enable the Jekyll Redirect From plugin and add your 301 redirects to all post and page front matter.
Should you decide to use a shared apex domain (godaddy.com) that is already hosting content, as opposed to using a dedicated subdomain (e.g., engineering.godaddy.com), you may need to make further decisions regarding whether to keep using our GitHub Pages deployment vs self-hosting Jekyll. I believe that, to use a subdirectory on the existing page, you will need to setup a reverse proxy from the subdomain to the GitHub Pages content.
Solved! By the way, that jekyll plugin can only redirect within the site. Since we needed to redirect to a whole other domain, I set up the redirect copy of the blog with meta refresh url redirections