-1

My website works fine offline. When I upload it to the server, the CSS does not work. What makes it more confusing;

  1. I uploaded the website to my University server using the FTP account I was given. The website displays fine.
  2. I uploaded the website to my own server, the CSS doesn't work, neither does the favicon.

This means all the file links are working etc, but it isn't working on my server. Even the Google Fonts isn't working.!

I haven't changed any settings in my account etc.

1 - Folder Structure 2 - CSS links in my HTML

RonaIdo
  • 81
  • 2
  • 3
  • 10
  • try to write the url of your css in the browser. Only for be sure that the server can found the file. Like for example: http://cdn.sstatic.net/stackoverflow/all.css – Raúl Martín Jun 06 '15 at 22:05
  • You don't have permission to access /style.css on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. – RonaIdo Jun 06 '15 at 22:06
  • Check the permissions of your files in your FTP, is it set so it can be read? – Spencer Wieczorek Jun 06 '15 at 22:08
  • Use the developer tools in the browser to watch the network traffic, to determine if the page tries to load the CSS file, where it actually tries to load it from, and what the result is. – Guffa Jun 06 '15 at 22:09
  • @SpencerWieczorek yeah I checked that and all are set so they're readable. – RonaIdo Jun 06 '15 at 22:10
  • That CSS file looks huge. What's in it? – Guffa Jun 06 '15 at 22:15
  • it hapened the same with fancybox.min.css?? – Raúl Martín Jun 06 '15 at 22:16
  • the file on server needs to be 755 permission,also try to set absolute path for CSS ( and then display that same link on browser) – maioman Jun 06 '15 at 22:17
  • @Guffa Please see the screenshot http://oi57.tinypic.com/o8ctqw.jpg. Confirms it isn't loading, not too sure what the rest of the info means if I am honest. – RonaIdo Jun 06 '15 at 22:17
  • @Guffa didn't notice that. It definitely wasn't that big earlier on so I will have to check it out. Although other things such as the fancybox.min.css & favicon isn't working either so although the large CSS file is a problem, I don't think it's affecting this particular problem. – RonaIdo Jun 06 '15 at 22:20
  • @RaúlMartín yes and the favicon too. – RonaIdo Jun 06 '15 at 22:20
  • @maioman Checked both of those, no luck. – RonaIdo Jun 06 '15 at 22:21
  • might be related: http://stackoverflow.com/questions/10985342/apache-403-while-serving-django-static-files – Emre Senturk Jun 06 '15 at 22:22
  • That status code `403 Forbidden` means that you are not allowed to view the file. That is probably due to a file permission issue. Well, first check what's actually in the file, as it shouldn't grow by itself... – Guffa Jun 06 '15 at 22:41

1 Answers1

0
  1. Make sure it is not about caching.
  2. Link css, favicon from your university server to see if it is not related with server configuration
Emre Senturk
  • 345
  • 5
  • 13
  • Linking the CSS directly from the Uni server and it works, so problem is definitely with my server. I am not sure why as I have literally used it for the first time today and haven't made any changes to settings etc. – RonaIdo Jun 06 '15 at 22:24
  • can you give any hints about your configuration file. The problem must be it I think. – Emre Senturk Jun 06 '15 at 22:29
  • What do you mean by configuration file? Sorry, pretty new to this. – RonaIdo Jun 06 '15 at 22:41
  • no need to be sorry :) is there any .htaccess file on the site directory – Emre Senturk Jun 06 '15 at 22:48
  • No there is no file I'm afraid. – RonaIdo Jun 06 '15 at 22:53
  • All seems to be working now. I set the permissions on the final page to 755 (despite it being that already) and it now works. Everything is working now, I'm not completely sure what the solution was but setting the permissions again seemed to do the trick. Just confusing because they were set correctly originally. Thank you for the help, much appreciated. – RonaIdo Jun 06 '15 at 22:58