Hello, what could be the problem, when I set the parameter http://site.ru/page/param in param or put a slash extra on the site, styles and scripts fly off, in the console it displays an error:

Resource interpreted as Stylesheet but transferred with MIME type text / html: " http://site.ru/page/param ".

And points to the connection string styles:

<link rel="stylesheet" type="text/css" href="../css/style.css">

Apache server, in .htaccess is worth Options -Multiviews

  • Try to replace href="../css/style.css" by href="/css/style.css" - Stanislav Grot
  • Thank you, everything works, but why is this happening? After all, if I copy the link, I will open a file with a scr in the browser. - Ruslan

1 answer 1

You specify a link relative to the current directory, you need to specify relative to the root directory, replace

 href="../css/style.css" 

on

 href="/css/style.css" 
  • Thank you, everything works, but why is this happening? After all, if I copy the link, I will open a file with a scr in the browser - Ruslan