I'm new only at that so bare beside me. I've just set up Apache and PHP to operate on my small local Mac OS X computer. Now PHP works fine, except after i attempt to load the files for my live sites. The live sites have separate sites and therefore are sorted by client title etc.

I have produced symlinks within the default root for that local web server documents. My problem is the fact that Apache does not appear to wish to load the relative pathways which are based in the HTML pages. For instance, I've src="/css/primary.css" but Apache does not load the file, similarly for images, it simply resolves like a file not found 404 error. Then i thought it may be the symlinks and so i replicated the entire directory in to the Apache document root, but still had exactly the same result.

I'd love to create my local development atmosphere to operate Apache, PHP, MySQL to build up in your area then publish when ready. I additionally attempted the MAMP installation, coupled with exactly the same issues.

Any help whatsoever in this is greatly appreciated. If my explanation wasn't obvious please tell me.

Thanks! Alex.

Perhaps you have attempted src="css/primary.css"? That's, with no leading slash? For those who have a number one slash there your files would need to maintain a directory named css which was within the root directory from the webserver, and when I realize you properly that isn't the situation.

EDIT: OK, from reading through your comments it appears as if you are less than obvious how relative web addresses work. "/css/primary.css" isn't in accordance with the page's location within the directory tree. This means personal files named "primary.css" inside a directory named "css" within the root directory from the webserver. Whenever you place your files around the deployment server your css directory is in the webserver's root directory. However it seems like you're presently putting the css directory inside a subdirectory named for that client... so that your css file has become living at "/clientname/css/primary.css".

Basically understand you properly, that you can do what you would like by utilizing relative web addresses. In case your html file is incorporated in the same directory because the css directory you'd need "css/primary.css". Whether it's inside a subdirectory from the directory that consists of the css directory you'd need "../css/primary.css"- the ".." means parents directory from the current directory. If you are using relative web addresses they will work as lengthy because the relationship between your files does not change.

Here is a page about them that describes it adequately, I believe: http://www.webreference.com/html/tutorial2/3.html. Was virtually the very first factor I discovered in the search engines though, so you will find likely better explanations available.

You will find numerous Apache directives you could use to get this done, but when using relative web addresses would meet your needs (and when I realize you properly it might) then that's apt to be a great deal simpler and fewer prone to result in further trouble.