if (!isset($vars['task'])) { $vars['task'] = 'sitemap'; } switch ($vars['task']) { case 'google': //normally never used; return $mosConfig_live_site.'/sitemap.xml'; break; case 'sitemap': default: return $mosConfig_live_site.'/sitemap/'; break; }}/********************//* RESTORE SEO LINK *//********************/function seores_com_sitemap($seolink='', $register_globals=0) { global $database, $lang; $seolink = urldecode($seolink); $seolink = trim(preg_replace('/(&)/', '&', $seolink)); $link = preg_split('/[\?]/', $seolink); $itemsyn = intval(mosGetParam( $_SESSION, 'itemsyn', 0 )); $QUERY_STRING = array(); $_GET['option'] = 'com_sitemap'; $_REQUEST['option'] = 'com_sitemap'; $QUERY_STRING[] = 'option=com_sitemap'; $parts = preg_split('/[\/]/', $link[0]); preg_match('/sitemap\-(.*?)\.xml/', $parts[0], $gmatches); if ($parts[0] == 'sitemap.xml') { $_task = 'google'; } else if ($gmatches && isset($gmatches[1]) && ($gmatches[1] != '')) { $m = htmlspecialchars($gmatches[1]); $_GET['maplang'] = $m; $_REQUEST['maplang'] = $m; $QUERY_STRING[] = 'maplang='.$m; $_task = 'google'; } else { $_task = 'sitemap'; } $_GET['task'] = $_task; $_REQUEST['task'] = $_task; $QUERY_STRING[] = 'task='.$_task; if (!$itemsyn) { $query = "SELECT id FROM #__menu WHERE link='index.php?option=com_sitemap' AND published='1'" ."\n AND ((language IS NULL) OR (language LIKE '%".$lang."%'))"; $database->setQuery($query, '#__', 1, 0); $_Itemid = intval($database->loadResult()); } else { $_Itemid = $itemsyn; } $_GET['Itemid'] = $_Itemid; $_REQUEST['Itemid'] = $_Itemid; $QUERY_STRING[] = 'Itemid='.$_Itemid; $qs = ''; if (count($QUERY_STRING) > 0) { $qs = implode('&',$QUERY_STRING); } if (trim($link[1]) != '') { $qs .= ($qs == '') ? $link[1] : '&'.$link[1]; } $_SERVER['QUERY_STRING'] = $qs; $_SERVER['REQUEST_URI'] = ($qs != '') ? '/index.php?'.$qs : '/index.php';}
UP The SEO pro is well install. How Can I Change the name google.xml to sitemap.xmlThanks !!!