In my directory, the folders are named in uppercase letters and have the following structure:
ONLINESHOP
|-- index.html
|-- COMPONENTS
|-- CONFIG
|-- TEMPLATES
|-- CSS
|-- main-style.css
|-- CONTROLLERS
|-- MODELS
|-- VIEWS
...
|-- USER
|-- login.html
The main folder is OnlineShop. My goal is to access main-style.css
from login.html
This method works:
<link rel="stylesheet" type="text/css" href="/OnlineShop/templates/css/main-style.css">
However, this approach does not work:
<link rel="stylesheet" type="text/css" href="/templates/css/main-style.css">
I wonder why the latter code fails to work. Shouldn't /
lead me to the root directory (OnlineShop)?