What is the problem?
Well let me describe it this way: You know that your google pr is calculated using recommendation links for example you have one back link on
http://yoursite.com/index.php
and another on your site:
http://yoursite.com/
First link will give your index.php page pr and second will give pr to your domain (just root). Main problem is that you can’t change links on other sites.
I have written simple script that will redirect your visitors (ex. googlebot) via http headers so pr will be targeted to only one page.
( http://yoursite.com and http://www.yoursite.com are also treated as different urls )
function seoDomain($defaultPage = ‘index.php’)
{
$rest = $reqUri = array();
$loc = 'http://';
$reqUri = explode('/', $_SERVER['REQUEST_URI']);
$rest = explode('.', $_SERVER['HTTP_HOST']); if ($rest[0] == 'www')
{
unset($rest[0]);
$loc .= implode('.', $rest);
}
else
{
$loc .= $_SERVER['HTTP_HOST'];
}if(end($reqUri) == $defaultPage)
{
/* since you're unsetting $reqUri[0], count($reqUri) will actually be (count($reqUri) -1) at this point */
unset($reqUri[0], $reqUri[count($reqUri)]);
$loc .= (!empty($reqUri)) ? '/' . implode('/', $reqUri) . '/' : '/';
}
else
{
$loc .= $_SERVER['REQUEST_URI'];
}
return $loc;
}
header("HTTP/1.1 301 Moved Permanently");
header('Location:' . seoDomain());