Forum Moderators: martinibuster
I wonder if that effects my pr or results in Search Engines, any respond would be kindly appreciated.
Thanks..
I think Brett mentioned a few good insights as to why relative is the better practice a while back too in a thread on relative (/yourpage.html) and absolute (hzzp://www.yourdomain.com/yourpage.html) linking - do a search on google and you should come up with it. I remember one was about a user saving a page locally and the links not working if they read it from that saved version.
As sr said, it makes it hard to click around on a local version, but you know, do whatever makes you sleep better at night.
domain.php would hold something as simple as:
<?php $domain = "http://www.mysite.com/";?>
OR when working locally
<?php $domain = "http://localhost/";?>
then on your website include domain.php on all your pages and when you add a link to say mypage.html just make link look like:
[<a href='<?php echo $domain;?>mypage.html'>link text</a>]
There ya have it absolute linking with the ease of relative linking
That way, links to your home page wouldn't change should you ever change from php to some other file type.
Note: space replacing ":" in the above is for display on WebmasterWord only)