Voici le code de mon fichier sitemap.
Sinon j'ai lu sur le forum que (peut-être) fallait aussi valider le site avec un fichier html à la base du site mais il est indétectable avec l'url rewriting.

<?php
/**
* This file is part of
* pragmaMx - Web Content Management System.
* Copyright by pragmaMx Developer Team - http://www.pragmamx.org
*
* pragmaMx is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* $Revision: 1.10.2.2 $
* $Author: tora60 $
* $Date: 2007/12/22 14:11:50 $
*
* Format der Ausgabe: http://www.sitemaps.org/
*/
include_once('mainfile.php');
/**
* /////////////////// Konfiguration ///////////////////////////////
*
* Schluesselbegriffe, die die Wertigkeit der einzelnen Links erhoehen, wenn sie im Text oder Titel vorkommen
*/
$keywords = array('pragmamx', 'vkpMx', 'VKP', 'php', 'shiba');
/**
* Maximale Anzahl der Artikel/Links pro Modul
*/
$limit = 30;
/**
* Module, die in der Gesamtliste der Module nicht erscheinen sollen, das betrifft nur den Link zum Modul selbst
*/
$excludemodules = array('blank_Home', 'User_Registration', 'Userinfo', 'Avatar');
/**
* /////////////////// Ende der Konfiguration ///////////////////////////////
*/
/**
* eventuelle Ausgaben zwischenspeichern, um sie spaeter zu verwerfen ;)
*/
ob_start();
// error_reporting(E_ALL);
error_reporting(0);
$i = 0;
$item = array();
$keywords = implode('|', $keywords);
/**
* alle Module
*/
$modules = sql_query("SELECT title FROM " . $prefix . "_modules WHERE active=1 AND view=0");
while (list($modulename) = sql_fetch_row($modules)) {
$i++;
// variable zum pruefen ob Modul aktiv
$modcheck[$modulename] = 1;
if (!in_array($modulename, $excludemodules))
$item[$i]['link'] = MX_HOME_URL . "/modules.php?name=" . $modulename;
}
function storiescat()
{
global $limit, $prefix, $i, $item, $keywords;
if (!google_allowed("News"))
return;
$result = sql_query("SELECT DISTINCT c.catid, c.title, MAX( UNIX_TIMESTAMP(s.time) ) AS sTime
FROM `{$prefix}_stories_cat` AS c
LEFT JOIN {$prefix}_stories AS s ON ( c.catid = s.catid )
WHERE s.catid IS NOT NULL AND `time` <= now()
GROUP BY c.catid
LIMIT " . $limit);
if ($result) {
while ($row = sql_fetch_object($result)) {
$i++;
$item[$i]['link'] = MX_HOME_URL . "/modules.php?name=News&file=categories&op=newindex&catid=" . $row->catid;
if (preg_match('#(' . $keywords . ')#i', $row->title))
$row->sTime = time();
$item[$i]['date'] = intval($row->sTime);
}
}
}
function topics()
{
global $limit, $prefix, $i, $item, $keywords;
if (!google_allowed("News") || !google_allowed("Topics"))
return;
$result = sql_query("SELECT DISTINCT t.topicid, t.topicname, MAX( UNIX_TIMESTAMP(s.time) ) AS sTime
FROM `{$prefix}_topics` AS t
LEFT JOIN {$prefix}_stories AS s ON ( t.topicid = s.topic )
WHERE s.topic IS NOT NULL AND `time` <= now()
GROUP BY t.topicid
LIMIT " . $limit);
if ($result) {
while ($row = sql_fetch_object($result)) {
$i++;
$item[$i]['link'] = MX_HOME_URL . "/modules.php?name=News&new_topic=" . $row->topicid;
if (preg_match('#(' . $keywords . ')#i', $row->topicname))
$row->sTime = time();
$item[$i]['date'] = intval($row->sTime);
}
}
}
function stories()
{
global $limit, $prefix, $i, $item, $keywords;
if (!google_allowed("News"))
return;
$result = sql_query("SELECT sid, title, hometext, UNIX_TIMESTAMP(time)AS date FROM " . $prefix . "_stories WHERE `time` <= now() ORDER BY `time` DESC, sid DESC limit " . $limit);
if ($result) {
while ($row = sql_fetch_object($result)) {
$i++;
$item[$i]['link'] = MX_HOME_URL . "/modules.php?name=News&file=article&sid=" . $row->sid;
if (preg_match('#(' . $keywords . ')#i', $row->title . $row->hometext))
$row->date = time();
$item[$i]['date'] = intval($row->date);
}
}
}
function content()
{
global $limit, $prefix, $i, $item, $keywords;
$module_name = "Content";
if (!google_allowed($module_name))
return;
$result = sql_query("SELECT pid, title, subtitle, page_header, text, page_footer, signature, UNIX_TIMESTAMP(date) AS date FROM " . $prefix . "_pages WHERE `active` = 1 ORDER BY `date` DESC limit " . $limit);
if ($result) {
while ($row = sql_fetch_object($result)) {
$i++;
$item[$i]['link'] = MX_HOME_URL . "/modules.php?name=" . $module_name . "&pid=" . $row->pid;
if (preg_match('#(' . $keywords . ')#i', $row->title . $row->subtitle . $row->page_header . $row->text . $row->page_footer . $row->signature))
$row->date = time();
$item[$i]['date'] = intval($row->date);
}
}
}
function contentcat()
{
global $limit, $prefix, $i, $item, $keywords;
$module_name = "Content";
if (!google_allowed($module_name))
return;
$result = sql_query("SELECT DISTINCT c.cid, c.title, MAX( UNIX_TIMESTAMP(p.date) ) AS pDate
FROM `{$prefix}_pages_categories` AS c
LEFT JOIN {$prefix}_pages AS p ON ( c.cid = p.cid )
WHERE p.cid IS NOT NULL AND `date` <= now()
GROUP BY c.cid
LIMIT " . $limit);
if ($result) {
while ($row = sql_fetch_object($result)) {
$i++;
$item[$i]['link'] = MX_HOME_URL . "/modules.php?name=" . $module_name . "&cid=" . $row->cid;
if (preg_match('#(' . $keywords . ')#i', $row->title))
$row->pDate = time();
$item[$i]['date'] = intval($row->pDate);
}
}
}
function links()
{
global $limit, $prefix, $i, $item, $keywords;
if (!google_allowed("Web_Links"))
return;
$result = sql_query("select lid, title, description, UNIX_TIMESTAMP(date) AS datum, submitter from " . $prefix . "_links_links ORDER BY date DESC limit " . $limit);
if ($result) {
while ($row = sql_fetch_object($result)) {
$i++;
$item[$i]['link'] = MX_HOME_URL . "/modules.php?name=Web_Links&op=view&lid=" . $row->lid;
if (preg_match('#(' . $keywords . ')#i', $row->title . $row->description))
$row->datum = time();
$item[$i]['date'] = intval($row->datum);
}
}
}
function downloads()
{
global $limit, $prefix, $i, $item, $keywords;
if (!google_allowed("Downloads"))
return;
$result = sql_query("select lid, title, description, UNIX_TIMESTAMP(date) AS datum, submitter from " . $prefix . "_downloads_downloads WHERE cid > 0 ORDER BY date DESC limit " . $limit);
if ($result) {
while ($row = sql_fetch_object($result)) {
$i++;
$item[$i]['link'] = MX_HOME_URL . "/modules.php?name=Downloads&op=view&lid=" . $row->lid;
if (preg_match('#(' . $keywords . ')#i', $row->title . $row->description))
$row->datum = time();
$item[$i]['date'] = intval($row->datum);
}
}
}
/**
* mxBoard
*/
function eBoard($modname)
{
global $limit, $prefix, $i, $item;
if (!google_allowed($modname))
return;
if (!@include("modules/" . $modname . "/settings.php"))
return;
$result = sql_query("SELECT a.tid, a.subject, a.message, a.lastpost, a.dateline, b.private, b.userlist FROM " . $table_threads . " AS a LEFT JOIN " . $table_forums . " AS b ON a.fid =b.fid WHERE private='' AND userlist='' ORDER BY a.lastpost DESC limit " . $limit);
if ($result) {
while ($row = sql_fetch_object($result)) {
$i++;
$item[$i]['link'] = MX_HOME_URL . "/modules.php?name=" . $modname . "&file=viewthread&tid=" . $row->tid;
$item[$i]['date'] = intval(substr($row->lastpost, 0, (strpos($row->lastpost, "|"))));
}
}
}
/**
* SMF-Forum
*/
function simple($modname)
{
global $limit, $prefix, $i, $item;
if (!google_allowed($modname)) {
return;
}
// Boards die nicht angezeigt werden sollen, als Array
$exclude_boards = null;
// / versch. globale Variablen vorher initialisieren, weil in Funktionen aufgerufen
global $db_prefix, $settings, $context, $mxsmf;
if (!@include('modules/' . $modname . '/mx_SSI.php') || !function_exists('mxSmfCreatePmxUrl')) {
return;
}
$posts = ssi_recentTopics(intval($limit), $exclude_boards, 'array');
// $posts = ssi_recentPosts(intval($limit), $exclude_boards, 'array');
foreach ($posts as $row) {
$i++;
$item[$i]['link'] = mxSmfCreatePmxUrl(str_replace(';topicseen', '', $row['href']));
$item[$i]['date'] = intval($row['timestamp']);
}
}
/**
* Coppermine 1.3.x
*/
function coppermine13($modname)
{
global $limit, $prefix, $i, $item, $keywords;
if (!google_allowed($modname)) {
return;
}
// Coppermine configuration file
if (!is_file('modules/' . $modname . '/blocks.inc.php'))
return;
include('modules/' . $modname . '/blocks.inc.php');
$qry = "
SELECT p.pid, p.ctime, p.url_prefix, p.filename, p.caption, p.keywords, p.title, p.aid
FROM $CONFIG[TABLE_PICTURES] AS p INNER JOIN $CONFIG[TABLE_ALBUMS] AS a ON (p.aid = a.aid)
WHERE p.approved='YES' AND " . $vis_groups . "
ORDER BY p.pid DESC
LIMIT $limit
";
$result = sql_query($qry);
if ($result) {
$pic = 0;
while ($row = sql_fetch_object($result)) {
$i++;
$item[$i]['link'] = MX_HOME_URL . '/modules.php?name=' . $modname . '&file=displayimage&album=lastup&cat=0&pos=' . $pic;
if (preg_match('#(' . $keywords . ')#i', $row->filename . $row->caption . $row->keywords . $row->title))
$row->ctime = time();
$item[$i]['date'] = intval($row->ctime);
$pic++;
}
}
}
function google_allowed($module)
{
global $modcheck;
return isset($modcheck[$module]);
}
function google_priority($date)
{
$erg = (time() - intval($date)) / 60 / 60 / 24;
if ($erg > 0)
$erg = round(365 / $erg) * 0.1;
else
$erg = 0.1;
if ($erg < 0.1)
$erg = 0.1;
else if ($erg > 1)
$erg = 1;
return $erg;
}
/**
* ist mod_rewrite aktiviert?
*/
function google_modrewrite()
{
static $check;
if (!isset($check)) {
$check = false;
if (!empty($GLOBALS['mxUseModrewrite']['anony'])) {
if (is_file('.htaccess') && is_file('includes/mx_modrewrite.php')) {
@include_once('includes/mx_modrewrite.php');
$check = function_exists('mxPrepareModRewrite');
}
}
}
return $check;
}
/**
* die Einzelnen Abfragen fuer Module ausfuehren;
*/
storiescat();
stories();
content();
contentcat();
downloads();
links();
simple('Forum');
eBoard('eBoard');
coppermine13('Gallery');
/**
* Ausgabe zunaechst in einem Array zwischenspeichern
*/
$out_array = array();
foreach($item as $i => $url) {
$priority = (isset($url['date'])) ? google_priority($url['date']) : '0.5';
$lastmod = (isset($url['date'])) ? $url['date'] : time();
// der Schl?als Dezimalstring f? sp?re Sortierung
$out_array[($priority * 10) . '.' . (10000 - $i)] = '
<url>
<loc>' . htmlentities($url['link']) . '</loc>
<lastmod>' . strftime('%Y-%m-%d', $lastmod) . '</lastmod>
<priority>' . $priority . '</priority>
</url>';
// <changefreq>always</changefreq>
}
/**
* das Array, nach der Wertigkeit (Schluesselwerte abwaerts sortieren
*/
krsort($out_array);
/**
* das Array jetzt in den String umwandeln
*/
$out = implode('', $out_array);
/**
* Ersetzen der Links in ein suchmaschinenfreundliches Format.
* Der Ausgabepuffer wurde in mx_baseconfig explizit gestartet!
* falls doch leer, ist nix mit mod_rewrite
* Die Links fuer das SMF Forum werden in der SMF-Funktion extra umgeschrieben
*/
if (google_modrewrite() && $out) {
// den <loc> Tag gegen <link> Tag austauschen, weil den nur prepareauto() versteht
$out = preg_replace('#(</?)loc>#', '\1link>', $out);
// output mit normaler mod_rewrite Funktion umschreiben
$out = mxPrepareModRewrite($out);
// <lo> Tag wieder zur?
$out = preg_replace('#(</?)link>#', '\1loc>', $out);
}
/**
* eventuelle Script oder Fehlerausgaben verwerfen
*/
while (ob_get_contents()) {
ob_end_clean();
}
/**
* XML Header senden
*/
header("Content-Type: text/xml");
/**
* Ausgabe fertigstellen mit Kopf und Fuss
*/
echo '<?xml version=\'1.0\' encoding=\'UTF-8\'?>
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
', $out, '
</urlset>';