V
V
Valera Dobroman2019-12-19 02:50:10
htaccess
Valera Dobroman, 2019-12-19 02:50:10

I have a problem with .htaccess, namely with CSS, how to solve?

There is such a link
project2/profile
The CSS code works clearly for me and the whole layout is highlighted

But when I add text after /, that is,
project2/profile/Valera123

CSS just stops working, that is, the site thinks that I am moving to another file, but the .htaccess code such is

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [L]


In addition, when I add "../css/style.css" to the CSS file path, everything works fine, but I can't add "../" to each link, it's just not correct, please help me to solve the problem .

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
wisgest, 2019-12-19
@Valera221

add "../" to each link, it's just not smart

Who came up with this?
Okay, add toindex.php
<base href="/">

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question