TomCat
05-12-2010, 11:42 AM
I just setup an apache server last night, and I'm liking what I see. I have all of my files contained in /htdocs/ but I have a few websites that I have on my new local server that I've copied from my live server. Inside the /htdocs/ directory, I have three folders, like this example directory structure:
htdocs/
website1/
website2/
website3/
Now, in each of the website folders, paths to included files (such as CSS and Javascript) are written as though the each website is on its own domain. So, for example, each one would call a CSS file in the HTML with this path:
/css/site.css
However, now that these three websites and their files are under a main root directory, calls such as these are looking for a /css/ directory in the /htdocs/ folder instead of in the specific website/ folder (whether it be website1, 2, or 3).
What I would like to know is if there is any way to make it so that these calls with leading slashes / will look for the files and directories that are called in the root of the website folder they are inside of, instead of looking for them in the actual /htdocs/ root directory.
Thanks a lot!
htdocs/
website1/
website2/
website3/
Now, in each of the website folders, paths to included files (such as CSS and Javascript) are written as though the each website is on its own domain. So, for example, each one would call a CSS file in the HTML with this path:
/css/site.css
However, now that these three websites and their files are under a main root directory, calls such as these are looking for a /css/ directory in the /htdocs/ folder instead of in the specific website/ folder (whether it be website1, 2, or 3).
What I would like to know is if there is any way to make it so that these calls with leading slashes / will look for the files and directories that are called in the root of the website folder they are inside of, instead of looking for them in the actual /htdocs/ root directory.
Thanks a lot!