I'm not sure I quite follow your description of the problem, can you explain in detail how the site name is added to the code? are you referring the require_once code?
Most problems like this are an issue with the site definition. See the "Defining a Dynamic Site in Dreamweaver" tutorial on the learning resources page:
resources.php