I've been having issues with my school website. Everything works fine when I work on it locally using tools like Atom or Wamp, but once I upload the files to my web server (an old laptop running Ubuntu 18.04 with a LAMP server), the CSS files, images, and href links stop working. I believe this is due to a problem with file paths that work locally but don't work when uploaded to a Linux server because of the "../" directing to the root directory or something.
Here's how the index.php file looks locally: https://i.sstatic.net/nt8Tb.jpg
And here's what it looks like on the webserver: https://i.sstatic.net/B6ycQ.png
This is how my files are organized (generated using the tree command in Windows cmd):
C:.
| index.php
| README.md
| tree.txt
+---css
| accueil.css
| footer.css
| header.css
|
+---fonts
| Lato-Black.ttf
| Lato-BlackItalic.ttf
...
...
... more contents listed within the same format...
...
...
\---viepro
formation.css
formation.php
viepro.css
viepro.php
Below are snippets of some of my files:
index.php (in the main directory of my site)
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<link rel="icon" type="image/png" sizes="32x32" href="../IMAGES\favicon\favicon-32x32.png">
...
...
... more code follows
...
My header file (located in /includes/header.html) - linked css is in /css/header.css
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="/css/header.css">
...
...
... more code follows
...
One example of a page on the site (only including one example as they all have the same layout)
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<link rel="icon" type="image/png" sizes="32x32" href="../../IMAGES\favicon\favicon-32x32.png">
...
...
... more code follows
...
If anyone can provide assistance or guidance on why the CSS files, images, and fonts are not linking properly on the server after uploading, I would greatly appreciate it. Thank you for taking the time to read this!