[!--quoteo(post=373659:date=May 14 2006, 01:06 AM:name=_will)--][div class=\'quotetop\']QUOTE(_will @ May 14 2006, 01:06 AM) [snapback]373659[/snapback][/div][div class=\'quotemain\'][!--quotec--] instead of trying include('this' OR 'that') (which won't work...), somthing as simple as [code] if ($bIsTopLevel) { include('config.inc.php'); } else { include('../config.inc.php'); } [/code] Another alternative would be to move all your pages to the second level of your web root, and just have an index.php in the top level. All of the files that you had originally in the top level could be moved to /main or /static. In the index you put [code] header('Location: main/index.php'); [/code] When a user accesses your site they will get forwarded automatically to your sublevel, and you don't have to worry about the headache of finding the right path based on which page the user is viewing, because they are always ../ from the web root. [/quote] The second option I would require me to redo all the linking for my pages as they were not relative (for some strange reason when I coded the site I used the full url). The first option would work, but I would need to use it on a second page too as the first include statement has a page that has its own include statement (the db connection info) but the code should be the same I think for both pages (is that correct?). The one peice that confuses me is how the variable is defined? Thanks for your help and fast reply Jonathan