First time hosting a website

Hello everyone ! For the first time I tried to host a website via a github page however I cannot seem to get my page to work : for some reason the CSS file isn’t loading, and I keep getting the error “GET https://hadrienallemon.github.io/css/style.css net::ERR_ABORTED”

It is the first time i’m acutally hosting a website, so i’m not sure what i’m doing wrong.

The main file containes the index.html and 3 files containing the css sheet, the javascript file and the images for the website, named respectively “css”,“js”,“img”, and here’s my index.html file :

<!DOCTYPE HTML>
<html>
  <head>
    <title>TIC TAC TOE</title>
    <link href="/css/style.css" rel="stylesheet" type="text/css" />
  </head>
  <body>
    <link href="https://fonts.googleapis.com/css?family=Gaegu" rel="stylesheet">
    <div class="main">
    <canvas></canvas>
      <div class="wrapper">
        <div class="outer"> 
       	  <div class= "winBox">
		    <p><span class="winner"></span>   Wins !!</p>
	      </div>
	      <div class = "character">
	  
	      <div class = "ptext" style="width : 100%;">
		  <p>Choose your Character ! </p>
	      </div>
		  <canvas></canvas>
		  <canvas></canvas>
	    </div>
        <table id="tb">
        </table>
      </div>
    <button class="reset">reset</button>
  </div>
</div>



<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>  
<script src = '/JS/tictactoeScript.js'></script>  

</body>
</html>

I really don’t know what do to :confused: Any help would be appreciated ! Thanks a lot !

The path is case sensitive! I hope that helps! :smile:

https://hadrienallemon.github.io/CSS/style.css

1 Like

I feel so stupid right now --"

Thanks a bunch ! It’s weird the case is sensitive when hosted but not when launched from the desktop :o You saved me hours of looking around <3

When you open your file from the desktop, you aren’t really visiting a URL, so it’s not case sensitive. Opening a file on your computer in your browser loads all the files like it would if you typed it into your file system. Your computer’s file system probably isn’t case sensitive, so for example if you open C:\PROGRAM Files that will be the exact same thing as C:\Program Files.

URL’s are case sensitive. If you were running a web server locally, then you would have to have exact URL matches. http://localhost/css/style.css would not work even though you are still on your own computer. But again, when you are just viewing a file in the browser, you aren’t really using a URL so I believe it follows file system rules.

If a site is hosted on a Linux server, filenames/paths will be case sensitive.

If hosted on a Windows server, it’s NOT case sensitive.

1 Like