Here is my GitHub repository on the gh-pages
branch. Everything looks good, I have my index.html
, my CSS, JS and pictures folders.
But when I access http://roine.github.com/p1 I get HTTP 404 not found.
Any explanation and solution?
The preferred files to be served are index. html , index.md , and README.md , in that order. If none of these files exist, your website will show a 404 Not Found error, even if there are other HTML files in the repository. Note that GitHub Pages is case-sensitive, so Index.
The simplest and easiest way to fix your 404 error code is to redirect the page to another one. You can perform this task using a 301 redirect. What's 301, you may ask? It's a redirect response code that signals a browser that the content has been transferred to another URL.
404 error codes are generated when a user attempts to access a webpage that does not exist, has been moved, or has a dead or broken link. The 404 error code is one of the most frequent errors a web user encounters. Servers are required to respond to client requests, such as when a user attempts to visit a webpage.
I had just one commit with all my files. I pushed an empty commit, refreshed the page and it worked.
git commit --allow-empty -m "Trigger rebuild" git push
If this doesn't work, as @Hendrikto pointed out in the comments, check out the Github status page and make sure GitHub Pages are operational.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With