How to specify the path to the css file if the site root is considered and the file is on a couple of levels above the root of the site?

There is such a structure.

---- <physical root of the site>
-------- /public #
------------ index.php # connect here
-------- /vendor
------------ /bootstrap
---------------- /css
------------------- style.css # connected

The website is looking for the path to CSS, starting from the site root, and all sorts of ../../../ are ignored if they are outside because there according to browser nothing, emptiness, oblivion and the abyss.
March 19th 20 at 08:33
2 answers
March 19th 20 at 08:35
You need to specify the web server where to find the files.
For example, for Apache in httpd.conf to do something like
Alias /bootstrap "/src/vendor/bootstrap"
In the html the path to register as
<link rel="stylesheet" href="/bootstrap/css/style.css">
Thank you, I hope that the nginx configuration is similar to the Directive) - Boyd commented on March 19th 20 at 08:38
@Boyd, if this approach is possible and that to do. - otis_Schmidt11 commented on March 19th 20 at 08:41
In nginx solved the problem using the same Directive, thanks for the help) - Boyd commented on March 19th 20 at 08:44
March 19th 20 at 08:37
css (and images, js and other resources) cannot be loaded from a folder that is not accessible from the web. Accordingly, the css folder should be in the public folder, and then respectively the path would be /css/style.css

Find more questions by tags HTMLCSS