Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
|
Your problem seems to be that you're using relative URLs as opposed to absolute URLs. For some reason, the prevailing wisdom among designers is to use relative URLs because it's "easier" from a design point of view and saves bandwidth, and among SEOs it's to use absolute URLs for issues of canonicalization (an absolute path defines one URL absolutely).
This is one of the rare times when the SEO community gets a design issue right, albeit for another reason in your case. The reason you want to use absolute URLs is because you use subfolders in your layout. By using absolute URLs, you can tell the server exactly where the CSS is, where the Javascripts are, etc. and so on. The increased bandwidth is marginal at best, and you're sure that your layout works every time.
My own trick is to have a variable called Page_Root (and another called Image_Root) in an include file, and define the paths for both localhost (my server) and the live server.
|