What is the best approach for redirection of old pages in Jekyll and GitHub Pages?

前端 未结 8 554
萌比男神i
萌比男神i 2020-12-07 09:38

I have blog on github pages - jekyll

What is the best way to solve url strategy migration?

I found the best practice in common is create htaccess like so

8条回答
  •  广开言路
    2020-12-07 09:49

    As others have mentioned, the best solution is to preserve working URLs or duplicate the pages and specify a canonical URL.

    Since github pages doesn't support true redirects, I chose to set up rerouter on Heroku to return 301 (permanent) redirects from my site's old domain to the new one. I described the details here:

    http://joey.aghion.com/simple-301-redirects/

提交回复
热议问题