I understand that .htaccess
is not supported by GitHub Pages. Is there an alternative for password-protecting particular directories for websites hosted by GitHub Pages?
Although you can't use .htaccess
or .conf
, Github has instructions on how to use the Jekyll Redirect From plugin.
"Unfortunately, GitHub pages only supports static pages. There is no way to make it execute server-side code and thus it's impossible to protect your pages with any kind of authentication scheme. If you expand further on why you need to password-protect your pages, maybe I can help you find a workaround."
I'm using a 404.html
to redirect users from old S9Y index.php to my new blog on Github Pages. Check this commit: https://github.com/lionello/lionello.github.io/commit/c175f6524a53e29aea1890c8a758afd0e8944852
来源:https://stackoverflow.com/questions/13446435/is-there-an-alternative-to-htaccess-for-github-pages