Error 404 when attempting to publish page via github - html

I am not having success when trying to publish my basic html page.
Here is my repository:
https://github.com/mathiasgc/mathiasgc.github.io
I have an index.html file in my master repository, as well as the CNAME with the domain name.
Thanks,
Mathias

The problem appears to be that you forgot to give your index file an extension. You have an index file successfully in your repository, but it is simply called index. You need to give it a valid index extension - in your case I believe you're looking for index.html.
When uploading your index file, make sure to actually call it index.html specifically, and not just index.
Hope this helps! :)

Related

How to post assignment .io on github?

guys I'm supposed to upload assignment for this online course..
I followed the tutorial along exactly but something is not working properly.
https://zwc1625.github.io/coursera-web24/ is the where my repo is published and it's working fine.
but,
https://zwc1625.github.io/coursera-web24/mod_2/
where mod_2 is the assignment folder containing 1 html and 1 css file,
when I try to type in this address in the url 404 comes up
My local drive is up to date with the github repo
Help. New and very frustrated with github, I'm spending so much time with this and making no progress.
Github will serve a few specifically named files automatically, like 'index.html', 'readme.md' or 'readme'. Most servers will look in the specified folder (https://zwc1625.github.io/coursera-web24/mod_2/) for files named: 'index' or 'default' with a specific extension like 'html', 'asp', 'xhtml'.
As the file in your folder 'mod_2' is called 'module2HTML.html' it will not get served automatically. Consequently, if you want to open that file in your browser, you will need to name it specifically in the URL you enter in the browser addressbar: https://zwc1625.github.io/coursera-web24/mod_2/module2HTML.html
Furthermore, when you did name your file 'index.html' it may be possible that there is a time lag between your 'commit' and Github being able to serve your page. Some patience may be required....

404 error on the default page on my Gitlab repository

This is my first time using Gitlab.
My repository url is myusername.gitlab.io/myrepo.
Opening that page gives me a 404 error, however when I open myusername.gitlab.io/myrepo/myindex.html, I get my index page.
Can someone tell me how I can set it so myusername.gitlab.io/myrepo loads myusername.gitlab.io/myrepo/myindex.html.
On a second note, I have seen other projects that use username.gitlab.iowithout the need for the/therepo` suffix.
Can anyone tell me how I can remove the suffix and just use the domain to access my repo.
Your server may prefer a default 'index' file to be loaded. In some cases, it may not handle the default file at all.
Rename you index file from myindex.html to index.html
First, to start, you can fork a pre-set project, with the right files in it (including an index.html): see gitlab.com/pages for examples, and "Getting started" for the steps
.
I really want to have myusername.github.io only
Second, that is a user website: make sure your repo (where you have forked/cloned the project example) is named after your GitLab login: <you>.gitlab.io.

How do I link two HTML files present on the same server?

I have signed up on infinityfree.net and uploaded my files online in the folder which said "upload yours files here".
Now there are two HTMLs present in the folder namely
Index2.html
chatbox.html
I want to link an chat box to an image in the index file I used all proper tags(I know because I tried https://www.google.com and it worked), but I'm just not able to do it.
Things I tried:
"https://www.domain-name.cf/chatbox.html"
"chatbox.html"
"/htdocs/chatbox.html"(htdocs is the name of the folder)
I also got the errors 404 and 403.
Please help.
I realized that infinityfree prevents accessing files which contains "chat" in their names , try to rename chatbox.html with another name who doesn't contain "chat" then it will work for sure .
If you are using PHP you can use the header("Location:path_to_your_file");
<img>...</img>
This should work for you.
Since both the files are in same folder you can directly write "chatbox.html".

Can Jekyll serve files when a directory of the same name exists?

I have a simple use case on a site that I am publishing with Jekyll:
I need to list values of a certain type. Let's say one type has URIs of the form .../base/typex/value. I am generating a file .../typex/value.md and Jekyll happily serves it.
I also want to serve pages listing all values. That page should be named .../base/typex or .../base/typex/ (I don't mind either way).
I cannot use the file .../base/typex/index.md to do this because in some cases, index is actually a valid value.
I am creating .../base/typex.md, but Jekyll ignores it, regardless of the permalink that I put in there that specifically has no trailing slash. Instead of serving the file, Jekyll serves the directory listing.
Is there any way I can solve this puzzle? If Jekyll had support for serving .../base/typex.md, everything would be good, but it seems as if as soon as there is a directory .../base/typex/, Jekyll simply ignores this file. Is there any workaround or configuration I can use? (And this is going to get hosted on GitHub, so I have no control over the Web server configuration.)
( https://github.com/dret/webconcepts/issues/25 has the backstory, in case anybody is interested. But the issue is fully described here, so there is no need to follow that link. )
I just tried to reproduce it with your provided repository, thanks for that!
If you create a file http-method.md in /concepts and set the permalink to
permalink: /concepts/http-method/, my local jekyll serves the page both in /concepts/http-method and /concepts/http-method/

When a URL ends in a slash, does that mean they're using an index file?

My spider sense tells me that they're not using a folder with an index file for each page, like apple's for example where http://www.apple.com/iphone/ ends in a slash. I've seen it also at other personal sites. How are they able to do it?
They use rewrite rules in their .htaccess files, so /iphone/ could be a folder, or it could be a controller/action of their web application.
Check this link for more info:
http://www.addedbytes.com/articles/for-beginners/url-rewriting-for-beginners/