I am developing several Web sites on my computer, and I use relative links like the good designer I am. Let's say I have a folder in "/Program Files/Apache/Apache Group/htdocs" called "website1" that contains a Web site. I have another Web site in a folder called "website2". To clarify, the two folders would be "/Program Files/Apache/Apache Group/htdocs/website1" and "/Program Files/Apache/Apache Group/htdocs/website2", respectively. When I test locally, I call files like this: "http://localhost/website1" and "http://localhost/website2". Let's say I publish my website1 remotely on the internet at "http://www.website1.com". Because of the way I had to link in my php code locally, what is "http://localhost/website1/index.php" on my machine must be "http://www.website1.com/website1/index.php" on my remote site in order for links, images, css, etc. to work. I would prefer for "http://localhost/website1/index.php" to map to "http://www.website1.com/index.php". Keep in mind that I do not control the remote servers; the hosting company does.
Is there some way to set my local document root so it can change variably to my different Web sites? Is there some way to set it up to where "http://website1.localhost" or "http://website1@localhost" (or something) can be used as the root for the website1 site and "http://website2.localhost" or "http://website2@localhost" can be used as the site root for the website2 site, etc.? Hope this makes sense, and I hope you guys can help me!