0

I am using Github Pages and moved my documentation site from https://mtk.sciml.ai/stable/ to https://docs.sciml.ai/ModelingToolkit/stable/, and so I want to setup a redirect. Because it's Github Pages, I cannot setup a 301 HTTP redirect (301 redirect for site hosted at github?) so I need to resort to an HTML redirect. However, the same documentation pages are used to build the new site as the old, so I want to set it up as a conditional redirect that says "if the domain is mtk.sciml.ai/*, then redirect to docs.sciml.ai/ModelingToolkit/*", though I'm not sure how to do that.

The Github Pages page mentions using https://github.com/jekyll/jekyll-redirect-from for the redirect, though I'm not sure how to setup conditionals there. I could also setup a bunch of <meta http-equiv="refresh" content="0; url=./stable/"/> tags on pages, but then I'm not sure how to make meta tags reflect a conditional as stated above. Possibly this can be done with some Javascript?

Chris Rackauckas
  • 18,645
  • 3
  • 50
  • 81

0 Answers0