I have in my head links to CSS files, but it treats them like relative paths.
My domain structure is: https://example.com/folder/index.php folder including folders with CSS and images and include files
My CSS link looks like this: <link rel="stylesheet" href="css/style.css">
Everything is ok on the main page, but when I go to for example: https://example.com/folder/friends it's ok too. But at https://example.com/folder/friends/mine CSS doesn't load.
I have already tried:
<link rel="stylesheet" href="/css/style.css">
<link rel="stylesheet" href="./css/style.css">
my .htaccess looks like this:
# enable rewrite engine
RewriteEngine On
# if requested url does not exist pass it as path info to index.php
RewriteRule ^$ index.php?/ [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php?/$1 [QSA,L]
my index looks like this:
<?php
include 'config/settings.php';
include 'inc/head.php';
?>
<body>
<div class="page">
<?php
include 'inc/menu.php';
include 'config/includes.php';
?>
</div>
</body>
In settings I exploding URL. And in includes I including files which I need to load.
In console it shows 200 to my styles