Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an alternative to .htaccess for GitHub Pages?

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?

like image 610
hatmatrix Avatar asked Nov 19 '12 01:11

hatmatrix


People also ask

Can you use GitHub Pages without Jekyll?

It is now possible to completely bypass Jekyll processing on GitHub Pages by creating a file named . nojekyll in the root of your pages repo and pushing it to GitHub.… It is now possible to completely bypass Jekyll processing on GitHub Pages by creating a file named .

Can I use JavaScript on GitHub Pages?

GitHub Pages is a static site hosting service that takes HTML, CSS, and JavaScript files straight from a repository on GitHub, optionally runs the files through a build process, and publishes a website.

Does GitHub Pages support HTTP?

About HTTPS and GitHub PagesAll GitHub Pages sites, including sites that are correctly configured with a custom domain, support HTTPS and HTTPS enforcement.


Video Answer


2 Answers

Although you can't use .htaccess or .conf, Github has instructions on how to use the Jekyll Redirect From plugin.

https://help.github.com/articles/redirects-on-github-pages/

The page above no longer has any mention of the plugin. The direct link to the jekyll-redirect-from plugin GitHub repo is https://github.com/jekyll/jekyll-redirect-from

like image 129
jondueck Avatar answered Sep 19 '22 02:09

jondueck


"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."

Source: https://webapps.stackexchange.com/questions/35692/is-there-an-alternative-to-using-htaccess-to-password-protect-subdirectories-in

like image 41
Nicolas Floquet Avatar answered Sep 20 '22 02:09

Nicolas Floquet