I'm new to making websites using PHP includes (normally everything would be Dreamweaver templates and library items). I'm still using DW templates, but all of the navigation, header and footer are all PHP includes. When I make a new page, say one directory inside of the root, DW automatically updates the references to the include files, which is nice. What DW doesn't do though is update the relative references inside those include files. So for pages in the root directory there is no problem, but for pages at any sub-level, no images display, and none of the nav links work.
So the problem I'm running into is that I can't navigate the site on my localhost, because the navigation links are all staying relative to the location of the navigation include file. So, you might say, why don't you just convert them all to absolute links? Because if I do that, I still can't navigate on Localhost because absolute links will shoot me to the online domain.
How do I get around this? Is there some way in PHP to automatically update img src references and link references based on where the page resides in relation to the site root?
Let me know if I need to explain this better. BTW, the reason I'm still doing DW templates with this is because I think it's better for SEO purposes to have actual pages instead of loading content via includes - "?page_1", etc. This is a medium-sized site I'm working on with a lot of pages and directories, so it's not like I can just put all my pages at the root level and not have this problem.
Thanks in advance.