Page 1 of 1

hide page alias from default page url in google sitemap generator

Posted: Fri May 11, 2007 12:37 pm
by balle
I noticed that the default url with priority 1 is www.domain.com/home instead of just www.domain.com
so i  managed to make the defauld url www.domain.com

replace in gsitemap.php

Code: Select all

echo ' <loc>' . $onecontent->GetURL() . '</loc>'. "\n";
with

Code: Select all

 if ($onecontent->GetURL() == $onecontent->DefaultContent()) {
		echo ' <loc>' . $gCms->config['root_url'] . '/</loc>'. "\n";}
		else {echo ' <loc>' . $onecontent->GetURL() . '</loc>'. "\n";}

Re: hide page alias from default page url in google sitemap generator

Posted: Sat May 12, 2007 6:09 am
by KO
Good idea!

Re: hide page alias from default page url in google sitemap generator

Posted: Sat May 12, 2007 7:57 am
by tsw
this is changed in GetUrl in svn and should affect everywhere.

1.1 will have use root_url for default content everywhere.