Adjusting wamp root directory

Hi,
I have (based on advise from tutorials set up my PHP site so that content intended to be viewed by users in in the “public” directory. As such I have set up domains to point to this directory as the root and then use relative paths to access includes etc in “non-public” directories.

This all works really well and I’m very pleased with it, BUT …

… I can’t see how to replicate this setup in wamp. I have updated httpd.conf to change the document root ("DocumentRoot “d:/wamp/www/public/”) and this works fine as includes are all correctly referenced . However when I echo an image reference () it seems that it won’t reference anything beyond the root.

Can anyone offer ideas on how to fix this? Ideally I’d like something I can dynamically apply so I don’t have to keep amending code when uploading to the live server

Many thanks,

Martin

Sponsor our Newsletter | Privacy Policy | Terms of Service