• Super User

    Controlla che il file .htaccess ti reindirizzi al forum e non alla root principale.


  • User

    Ok ho segnalato a google.
    Avevo sbagliato indirizzo.
    Aspetto che google l'analizzi e ti faccio sapere.
    Secondo il risultato che mi comunica mapforum.php è giusto?

    Ciao e grazie.


  • Super User

    Se non era corretto non te lo accettava 😉


  • User

    Cionf googole mi comunica :
    Errore HTTP generale: 404 non trovato

    Come devo fare il file non esiste nella cartella /forum, dove sbaglio ?

    Grazie tante ...


  • Super User

    Prova ad utilizzare il [url=http://www.xml-sitemaps.com/]sitemap generator


  • User

    Ciao Cionf,prima di tutto grazie per il tuo aiuto.
    Ho dato in pasto la directory http://www.cavalcalonda.com/forum/ a sitemap generator il risultato è stato Maximum 500 pages Limit Exceeded
    cmq ho visto il file .xml,è composto da una serie di URL del genere :
    http://www.cavalcalonda.com/forum/viewtopic.php?p=25
    Penso che vada bene giusto?
    Adesso che faccio,do in pasto questo .xml a google,senza utilizzare il mapforum.php ?
    Per tutti gli altri url che non vengono linkati ?

    Grazie ancora !!!!


  • Super User

    Ciao,
    Visto che ti da problemi di limiti puoi inserirli anche a mano. Basta fare copia e incolla cambiando il parametro dopo "p=" 😉


  • User

    Potrei fare anche così ma allora forse mi conviene comprare il software,altrimenti devo aggiornare continuamente la site map.
    Lascio stare il mapforum.php ?

    Ciao grandissimo !!!!


  • Super User

    Fare un aggiornamento a mano secondo me è meglio. Puoi gestirti tutto come vuoi e puoi fare in modo che venga segnalato solo quello che vuoi 😉

    Il mapforum potresti anche levarlo se utilizzi quel sito 😉

    Grazie a te 🙂


  • User

    Ciao, sono nelle stesse condizioni.

    Il mio forum sta nella sottocartella /phpBB3/

    qualcosa va qui solo-lost.it/phpBB3/mapforum.php
    Ma tutto il resto no:?.

    define('FORUM_DOMAIN_ROOT', 'miosito.it/phpBB3/'); // Full URL with trailing slash!
    
    define('FORUM_URL_PREFIX', 'viewforum.php?f='); // What comes up before the forum ID?
    define('FORUM_URL_SUFFIX', ''); // What comes up after the forum ID?
    define('THREAD_URL_PREFIX', 'viewtopic.php?t='); // What comes up before the thread ID?
    define('THREAD_URL_SUFFIX', ''); // What comes up after the thread ID?
    
    // --------------------------------------------------
    // You don't need to edit anything below this line!!!
    // --------------------------------------------------
    
    define('IN_PHPBB', true);
    $phpbb_root_path = './';
    $phpEx = substr(strrchr(__FILE__, '.'), 1);
    include($phpbb_root_path . 'common.' . $phpEx);
    include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
    
    if ($_GET['fid']) { $fid = $_GET['fid']; }
    
    // Sitemap File    <sitemapindex xmlns="google.com/schemas/sitemap/0.84">
    // URL Index File  <urlset xmlns="google.com/schemas/sitemap/0.84">';
    if (isset($fid)) {
      echo '<?xml version="1.0" encoding="UTF-8"?>'."\n";
      if ($fid == '65535') {
        // Let's first send out the header & homepage
        echo '  <urlset xmlns="google.com/schemas/sitemap/0.84">'."\n";
        echo '    <url>
          <loc>'.FORUM_DOMAIN_ROOT.'</loc>
          <changefreq>daily</changefreq>
        </url>';
        // Let's send out a URL list of forums
        $sql = 'SELECT forum_id FROM phpbb_forums';
        $result = $db->sql_query($sql);
        while ($data = $db->sql_fetchrow($result)) {
          echo '    <url>
          <loc>'.FORUM_DOMAIN_ROOT.FORUM_URL_PREFIX.$data['forum_id'].FORUM_URL_SUFFIX.'</loc>
          <changefreq>daily</changefreq>
        </url>';
        }
        echo '  </urlset>';
      } else {
        // Let's check it's not a restricted forum
        $sql = 'SELECT forum_id FROM phpbb_forums WHERE forum_id = "'.$fid.'"';
        $result = $db->sql_query($sql);
        $data = $db->sql_fetchrow($result);
        if ($data['forum_id'] == $fid) {
          echo '  <urlset xmlns="google.com/schemas/sitemap/0.84">'."\n";
          $sql = 'SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_username, p2.post_username AS post_username2, p2.post_time FROM phpbb_topics t, phpbb_users u, phpbb_posts p, phpbb_posts p2, phpbb_users u2 WHERE t.forum_id = '.$fid.' AND t.topic_poster = u.user_id AND p.post_id = t.topic_first_post_id AND p2.post_id = t.topic_last_post_id AND u2.user_id = p2.poster_id ORDER BY t.topic_type DESC, t.topic_last_post_id DESC';
          $result = $db->sql_query($sql);
          while ($data = $db->sql_fetchrow($result)) {
            echo '    <url>
          <loc>'.FORUM_DOMAIN_ROOT.THREAD_URL_PREFIX.$data['topic_id'].THREAD_URL_SUFFIX.'</loc>
          <lastmod>'.date('Y-m-d', $data['post_time']),'</lastmod>
        </url>';
            
          }
         echo '  </urlset>';
    
        }
      }
    } else {
      echo '<?xml version="1.0" encoding="UTF-8"?>'."\n";
      echo '  <sitemapindex xmlns="google.com/schemas/sitemap/0.84">'."\n";
        // Let's create a link to the main forum index sitemap
      echo '    <sitemap>
          <loc>'.FORUM_DOMAIN_ROOT.'forum-65535.xml</loc>
          <changefreq>monthly</changefreq>
       </sitemap>';
        // Let's do a loop here and list all the forums!
        $sql = 'SELECT forum_id FROM phpbb_forums';
        $result = $db->sql_query($sql);
        while ($data = $db->sql_fetchrow($result)) {
          echo '    <sitemap>
          <loc>'.FORUM_DOMAIN_ROOT.'forum-'.$data['forum_id'].'.xml</loc>
          <changefreq>daily</changefreq>
       </sitemap>';
        }
      echo "\n".'  </sitemapindex>';
    }
    
    ?>
    ```e il mio .htaccess:
    

    Options +FollowSymlinks
    RewriteEngine On
    #RewriteBase /

    RewriteRule ^mapforum.xml$ mapforum.php
    RewriteRule ^forum-([0-9]+).xml$ mapforum.php?fid=$1


  • User

    scusate, ora credo di aver sistemato, controllate nel link che ho in firma se aggiungendo /mapforum.xml funziona tutto come da manuale