Page 1 of 1

improving pagerank of default page

Posted: Tue Mar 21, 2006 8:50 pm
by tamlyn
It bothered me that the menu system linked to my home page (www.example.com) as www.example.com/home.html so I modified the getURL() method of the content class so that if mDefaultContent is true it just returns root_url. This improves the page ranking of the home page as it now appears as just one page rather than two separate pages. Someone who knows cmsms better than me will have to tell me if this breaks anything but in my limited testing it seems to work:

in the getURL() method of the ContentBase class in lib/classes/class.content.inc.php (line 1219 in v0.12) change this

Code: Select all

    if ($config["assume_mod_rewrite"] && $rewrite == true)
to this

Code: Select all

    if($this->mDefaultContent) 
    {
      $url = $config["root_url"];
    } 
    elseif ($config["assume_mod_rewrite"] && $rewrite == true)

Re: improving pagerank of default page

Posted: Tue Mar 21, 2006 8:54 pm
by jelle
Does it really matter if the url (and only the url) is different? As far as I know, google will recognise the duplicate content. I would assume that google'd be smart enough to treat it as one page if it is within the same domain. But I might be wrong. If it is as you say it is a usefull hack.

Re: improving pagerank of default page

Posted: Tue Mar 21, 2006 9:04 pm
by tamlyn
Hmmm. I'm sure some of my pages used to have different page ranks on the / and /home.html variations but checking now they're all the same. Maybe they've updated the algorithm or perhaps my  pagerank checker is playing tricks on me.

I think it looks kinda neater anyway.

Re: improving pagerank of default page

Posted: Wed Mar 22, 2006 12:55 am
by amygdela
Google recently edited the pageranks for websites. perhaps it was just that?