I read GitHub pages documentation for enabling redirects on GitHub Pages using the jekyll-redirect-from plugin. I was able to redirect from one page to another, but I have some different requirements. I need to redirect all pages from a starting url to another.
These URLs
www.example.com/abc/defwww.example.com/abc/xyz
should be redirected to
www.example.com
As stated in the documentation for the plugin, you can add specify multiple urls for the
redirect_fromkey.For example create a
index.mdfile with:and a
_config.ymlwith:Now both
/abc/defand/abc/xyzwill redirect to your index page.