I am creating a website with server side includes, and have multiple directories. For example in the head.html(it's an include) I am pointing the stylesheets as href="css/style.css" and it's works fine in the home page. but when I am trying to run a page inside the event (a folder/subdirectory) it's not taking the stylesheet. can anybody solve this out.
It's a pure HTML static website, can we use anything like clientResolveUrl or something like that?
If you're creating your project folder inside
\wamp\www\sitename
and include the css usingit will target the root folder, that is
www
in your case, not thesitename
, so you should write it like thisbut, you should probably use a
Virtual Host
so you can write it like the 1st one in your live site, here's the forum that explain how, and why you should be better using aVirtual Host