Ok I understand.
Well depending on how much control you have with the site
there might be some ways of doing it.
For example you could place the files in another dir under
the root of the domain so you would access the site like this -
http://yourdomain.com/newdir/index.php.
Then your vdir under localhost would have the same name as this dir
(e.g newdir) but would actually point directly to the folder with
the same name on the domain rather then the root. That way you
could use relative paths such as /newdir/somelink.cfm in your
headers/footers which will work at any level within the site on
both configs.
Alternatively you could make the same vdir on both sites with
both pointing the to the domains root. The relative link as in the
previous option will still work.
Hope that helps.