For example i am working on 2 projects, A & B, both of them in future will be hosted in root directories. Atm i have one apache web server with default parameters and i want to start working, so i create folder A and folder B, where i will store all needed files.
The problem is when i ll use something like
<script type="text/javascript" src="/resources/scripts/javascript.js" ></script>
<link href="/resources/styles/stylesheet.css" rel="stylesheet" type="text/css" />
both of the projects will call this files from apache root folder (httpdocs), not from /a/ and /b/ folders.
Things get worse when i am using PHP framework, so i cant just use
<link href="./resources/styles/stylesheet.css" rel="stylesheet" type="text/css" />
(dot before /resources/) because with routing project is trying to access controller like a folder and get resources from there.
Sounds like a small problem, but i cant figure it out and close this question for myself, so each time i need to develop something i invent workarounds again and again :)