Link to home
Start Free TrialLog in
Avatar of Crazy Horse
Crazy HorseFlag for South Africa

asked on

How to overcome broken links when using the same header inside and outside of user areas

I have the root of my site and I have a folder called USERS. Inside of that I have a page for editing a users profile. I am using the same header as the rest of the website but since the edit profile page is inside the USERS folder, all the links obviously don't work. Do I need to create a new header file which is essentially a duplicate but just change all the links or is there a more sophisticated way of doing this?
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Why not use explicit full links starting with http:// or https:// ?
Avatar of Crazy Horse

ASKER

I did think of that but then I have to change everything from localhost to a live server address when the site goes live. If that is common practice then so be it but I thought that there had to be a better way as that is just creating a lot of work for myself!

http://localhost:8888/mysite/users/profile.php

would have to be changed to http://mysite.com/users/profile.php

And I would have to do that for all links when going live. Again, not sure if that is common practice?
ASKER CERTIFIED SOLUTION
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial