aweb Posted December 23, 2009 Share Posted December 23, 2009 I believe that there is an easy way to solve my problem, maybe with a base URL... I'm new with php so I don't know a whole lot about this. So I have my general page header located at www.domain.com/include/header.php that I call with include("include/header.php"); Then I have the user header that shows when users login "www.domain.com/user/account.php", but this is the same as the general header and is located at: www.domain.com/include/userheader.php. What I want to do is simply use the general header for users also, but I don't want to have to go through all the links and add, i.e. "../whateverpage.php" for users as I update the header often and this is very time consuming. Is there any other way to do this? Quote Link to comment https://forums.phpfreaks.com/topic/186195-establishing-base-url/ Share on other sites More sharing options...
premiso Posted December 24, 2009 Share Posted December 24, 2009 If you want it all to be relative to the root of the webpage this add this to the html output in the header.php file: <base href="http://www.domain.com/"> As that would set the base url to that for each page so the links etc are all relative to that path. If that is not what you wanted please let me know and try to describe better what you want. Quote Link to comment https://forums.phpfreaks.com/topic/186195-establishing-base-url/#findComment-983453 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.