• User

    Ho seguito tutte le istruzioni,ho letto e riletto i varti post,ma ho un problema che non riesco a risolvere.
    Ho modificato il file mapforum.php e lo inserito nella cartella principale del forum quindi nel mio caso .cavalcalonda.com/forum/
    Per quanto riguarda il file .htaccess non l'ho trovato nella directory principale del forum ma nella directory .cavalcalonda.com/forum/cache , quindi l'ho copiato nella directory principale e modificato come avete scritto :

    
    Options +FollowSymlinks 
    RewriteEngine On 
    #RewriteBase / 
    RewriteRule ^mapforum.xml$ mapforum.php  
    RewriteRule ^forum-([0-9]+).xml$ mapforum.php?fid=$1  
    
    

    gli ho assegnato i permessi 777 con Dreamweaver.
    A questo punto se provo ad aprire il forum mi comunica **INTERNAL SERVER ERROR **e lo stesso succede se provo a lanciare il file mapforum.php.
    Se cancello il file .htaccess dalla directory principale il forum torna a funzionare e se lancio da browser il file mapforum.php mi comunica:

    **Execution of (forum/mapforum.php) is not permitted for the following reason: **
    **Script is group writable.**Vi allego anche il mapforum.php :
    [php]
    <?php
    // ==========================================================================
    // phpBB Google Sitemap Generator v1.0.1
    // http://www.gotaxe.com/phpbb-sitemap.php
    // ==========================================================================
    // Script created by John Brookes
    // Copyright John Brookes ©2005
    // http://www.gotaxe.com
    // ==========================================================================
    // This program 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 2 of the License, or
    // (at your option) any later version.
    //
    // This program is distributed in the hope that it will be useful,
    // but WITHOUT ANY WARRANTY; without even the implied warranty of
    // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    // GNU General Public License for more details.
    //
    // You should have received a copy of the GNU General Public License
    // along with this program; if not, write to the Free Software
    // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
    // ==========================================================================
    function make_url_friendly($url)
    {
    $url = strtolower($url);
    $find = array(' ',
    '&',
    '\r\n',
    '\n',
    '/',
    '\',
    '+');
    $url = str_replace ($find, '-', $url);
    $find = array(' ',
    'é',
    'è',
    'ë',
    'ê');
    $url = str_replace ($find, 'e', $url);
    $find = array(' ',
    'ó',
    'ò',
    'ô',
    'ö');
    $url = str_replace ($find, 'o', $url);
    $find = array(' ',
    'á',
    'à',
    'â',
    'ä');
    $url = str_replace ($find, 'a', $url);
    $find = array(' ',
    'í',
    'ì',
    'î',
    'ï');
    $url = str_replace ($find, 'i', $url);
    $find = array(' ',
    'ú',
    'ù',
    'û',
    'ü');
    $url = str_replace ($find, 'u', $url);
    $find = array('/[^a-z0-9-<>]/',
    '/[-]+/',
    '/<[^>]*>/');
    $repl = array('',
    '-',
    '');
    $url = preg_replace ($find, $repl, $url);
    return $url;
    }

    // Some configuration options!
    define('FORUM_DOMAIN_ROOT', 'http://www.cavalcalonda.com/forum/'); // Full URL with trailing slash!
    define('FORUM_URL_PREFIX', '-vf'); // What comes up before the forum ID?
    define('FORUM_URL_SUFFIX', '.html'); // What comes up after the forum ID?
    define('THREAD_URL_PREFIX', '-vt'); // What comes up before the thread ID?
    define('THREAD_URL_SUFFIX', '.html'); // What comes up after the thread ID?
    define('PHPBB_PREFIX', 'phpbb_'); // Your phpBB tables prefix, WITHOUT the _ character.
    // --------------------------------------------------
    // You don't need to edit anything below this line!!!
    // --------------------------------------------------
    define('IN_PHPBB', true);
    $phpbb_root_path = './forum/';
    include($phpbb_root_path . 'extension.inc');
    include($phpbb_root_path . 'common.'.$phpEx);
    if ($_GET['fid']) { $fid = $_GET['fid']; }
    // Sitemap File <sitemapindex xmlns=".google.com/schemas/sitemap/0.84">
    // URL Index File <urlset xmlns="[url=".google.com/schemas/sitemap/0.84"%3E%27"].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, forum_name FROM '.PHPBB_PREFIX.'forums WHERE auth_view = "0" and auth_read = "0" and forum_id not like "%-%"';
    $result = mysql_query($sql);
    while ($data = mysql_fetch_assoc($result)) {
    echo ' <url>
    <loc>'.FORUM_DOMAIN_ROOT.make_url_friendly($data['forum_name']).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_PREFIX.'forums WHERE auth_view = "0" and auth_read = "0" and forum_id = "'.$fid.'" and forum_id not like "%-%"';
    $result = mysql_query($sql);
    $data = mysql_fetch_assoc($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_PREFIX.'topics t, '.PHPBB_PREFIX.'users u, '.PHPBB_PREFIX.'posts p, '.PHPBB_PREFIX.'posts p2, '.PHPBB_PREFIX.'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 = mysql_query($sql);
    while ($data = mysql_fetch_assoc($result)) {
    echo ' <url>
    <loc>'.FORUM_DOMAIN_ROOT.make_url_friendly($data['topic_title']).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>'.str_replace("forum/", "", FORUM_DOMAIN_ROOT).'forum-65535.xml</loc>
    <lastmod>'.date('Y-m-d', $data['post_time']),'</lastmod>
    </sitemap>';
    // Let's do a loop here and list all the forums!
    $sql = 'SELECT forum_id FROM '.PHPBB_PREFIX.'forums WHERE auth_view = "0" and auth_read = "0" and forum_id not like "%-%"';
    $result = mysql_query($sql);
    while ($data = mysql_fetch_assoc($result)) {
    echo ' <sitemap>
    <loc>'.str_replace("forum/", "", FORUM_DOMAIN_ROOT).'forum-'.$data['forum_id'].'.xml</loc>
    <lastmod>'.date('Y-m-d', $data['post_time']),'</lastmod>
    </sitemap>';
    }
    echo "\n".' </sitemapindex>';
    }
    ?>
    [/php]
    Potete aiutarmi sono disperato.
    Grazie a tutti


  • User

    Ragazzi potete darmi una mano ?
    Leggete sopra
    Grazie


  • Super User

    Ciao cavalcalonda,
    prova a decommentare il #RewriteBase / in questo modo RewriteBase / e ad inserire la dicitura forum

    Inseriscilo così

    RewriteBase /forum/


  • User

    Grazi Cionfs,all'ora di pranzo provo e ti faccio sapere.

    Ma il file .htaccess deve essere inserito nella directory principale del sito cioè nel mio caso .cavalcalonda.com/forum/ ?

    Io ho copiato il file .htaccess che era presente nella cartella .cavalcalonda.com/forum/cache/nella directory principale e l'ho modificato ... giusto?

    Ti ringrazio moltissimo ... per l'aiuto !!!!


  • Super User

    Dovrebbe essere inserito in /forum


  • User

    Ho modificato con wordpad il fiel .htaccess così:
    Options +FollowSymlinks
    RewriteEngine On
    RewriteBase /forum/
    RewriteRule ^mapforum.xml$ mapforum.php
    RewriteRule ^forum-([0-9]+).xml$ mapforum.php?fid=$1

    l'ho inserito nella cartella principale del sito .cavalcalonda.com/forum/

    a questo punto se provo ad aprire il forum mi da il seguente errore :

    Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request.
    Please contact the server administrator, webmaster_At_register.it and inform them of the time the error occurred, and anything you might have done that may have caused the error.
    More information about this error may be available in the server error log.
    Apache/2.2.3 (Unix) mod_ssl/2.2.3 OpenSSL/0.9.7i DAV/2 PHP/5.1.2 Server at .cavalcalonda.comPort 80-

    Lo stesso succede se provo ad accedere al file mapforum.php ( che ti ho inserito nel post precedente) Cosa mi consigli di fare ? Sono dispertato sono tre giorni che provo ma non riesco ad arrivare a niente.Ti ringrazio per il tuo aiuto !!!


  • Super User

    Se ho ben capito sei hostato su register.it.... vedi se hai i permessi di scrittura chmod delle cartelle


  • User

    Sono tornato al lavoro e quindi posso accedere al sito soltanto con file manager offerto da register ...
    Ti ho allegato delle immagini dove visualizzo tutti i permessi sia della cartella principale del forum che delle sotto cartelle.

    Forse ho sbalgliaqto qualcosa ?

    Grazie tanto,mi dispiace per il disturbo ...
    Ciao


  • Super User

    Prova a settare i permessi chmod 777 ovvero drwxrwxrwx


  • User

    Ho impostato i permessi 777 alla cartella del forum al file .htaccess e al file mapforum.php.
    Non è cambiato niente solito errore.
    La cosa strana e che se lascio il file .htaccess nella directory principale del forum (dove si trova l'index.php) non riesco più ad aprire il forum cioe non ho più accesso ... mi dice
    Internal Server Error

    Grazie ancora !!


  • User

    Prova a cancellare tempraneamente il contenuto del file .htacces (solo il contenuto che hai aggiunto inerente al forum)


  • User

    Per creare questo file ho copiato quello che era nella directory cache e l'ho modificato come sopra scritto e l'ho inserito nella directory principale del forum.
    Giusto ?
    Facendo cosi il forum non si apre più ...

    Grazie,cmq adesso provo ...


  • User

    Vi ho allegato la struttura del forum nel mio sito:
    Il forum funziona solo se il file .htaccess è vuoto altrimenti ma errore e non funziona più niente.


  • User

    Se rileggi bene le ultime 6 pagine troverai il modo di farla funzionare...
    Cmq alla fine avrai una sitemap che apparentemente funziona ma google non te la accettera' per il formato non corretto...
    Almeno questo e quello che è sucesso a me dopo diversi giorni di prove, scritture e riscritture....

    Ma a qualcuno di voi a funzionato questa mapforum.php ????


  • User

    Dovevo settare i permessi a 755 e non 777 ... il risulato è questo :

    **** <?xml version="1.0" encoding="UTF-8" ?>
    - <sitemapindex xmlns="http://www.google.com/schemas/sitemap/0.84">
    - <sitemap>
    **** <loc>http://www.cavalcalonda.com/forum/forum-65535.xml</loc>

    **** <lastmod>1970-01-01</lastmod>

    **** </sitemap>

    - <sitemap>
    **** <loc>http://www.cavalcalonda.com/forum/forum-1.xml</loc>

    **** <lastmod>1970-01-01</lastmod>

    **** </sitemap>

    - <sitemap>
    **** <loc>http://www.cavalcalonda.com/forum/forum-4.xml</loc>

    **** <lastmod>1970-01-01</lastmod>

    **** </sitemap>

    - <sitemap>
    **** <loc>http://www.cavalcalonda.com/forum/forum-2.xml</loc>

    **** <lastmod>1970-01-01</lastmod>

    **** </sitemap>

    - <sitemap>
    **** <loc>http://www.cavalcalonda.com/forum/forum-3.xml</loc>

    **** <lastmod>1970-01-01</lastmod>

    **** </sitemap>

    - <sitemap>
    **** <loc>http://www.cavalcalonda.com/forum/forum-5.xml</loc>

    **** <lastmod>1970-01-01</lastmod>

    **** </sitemap>

    **** </sitemapindex>

    è giusto ?

    ora segnalo a google il file mapforum.xml ?

    Grazie


  • User

    @cavalcalonda said:

    Dovevo settare i permessi a 755 e non 777 ... il risulato è questo :

    <?xml version="1.0" encoding="UTF-8" ?>
    - <sitemapindex xmlns="http://www.google.com/schemas/sitemap/0.84">
    - <sitemap>
    <loc>http://www.cavalcalonda.com/forum/forum-65535.xml</loc>

    <lastmod>1970-01-01</lastmod>

    </sitemap>

    - <sitemap>
    <loc>http://www.cavalcalonda.com/forum/forum-1.xml</loc>

    <lastmod>1970-01-01</lastmod>

    </sitemap>

    - <sitemap>
    <loc>http://www.cavalcalonda.com/forum/forum-4.xml</loc>

    <lastmod>1970-01-01</lastmod>

    </sitemap>

    - <sitemap>
    <loc>http://www.cavalcalonda.com/forum/forum-2.xml</loc>

    <lastmod>1970-01-01</lastmod>

    </sitemap>

    - <sitemap>
    <loc>http://www.cavalcalonda.com/forum/forum-3.xml</loc>

    <lastmod>1970-01-01</lastmod>

    </sitemap>

    - <sitemap>
    <loc>http://www.cavalcalonda.com/forum/forum-5.xml</loc>

    <lastmod>1970-01-01</lastmod>

    </sitemap>

    </sitemapindex>

    è giusto ?

    ora segnalo a google il file mapforum.xml ?

    Grazie

    Ho segnalato a google il file mapforum.php ma dopo un pò di tempo mi ha elencato un errore 404,cioè che non trovava l'url segnalati dalla sitemap
    quindi deduco che ho sbagliato tutto .

    ❌x❌x❌x


  • User

    Ragazzi vi posto sotto il risultato che ottengo richiamando da browser il file mapforum.php, mi dite se è corretto ? l'indirizzi cosa indicano ? ho provato a segnalare a google il file mapforum.php ma non viene accettato,errore 404 file non trovato. Potete aiutarmi ?
    Grazie

    <?xml version="1.0" encoding="UTF-8" ?>
    - <sitemapindex xmlns="http://www.google.com/schemas/sitemap/0.84">
    - <sitemap>
    <loc>http://www.cavalcalonda.com/forum/forum-65535.xml</loc>

    <lastmod>1970-01-01</lastmod>

    </sitemap>

    - <sitemap>
    <loc>http://www.cavalcalonda.com/forum/forum-1.xml</loc>

    <lastmod>1970-01-01</lastmod>

    </sitemap>

    - <sitemap>
    <loc>http://www.cavalcalonda.com/forum/forum-4.xml</loc>

    <lastmod>1970-01-01</lastmod>

    </sitemap>

    - <sitemap>
    <loc>http://www.cavalcalonda.com/forum/forum-2.xml</loc>

    <lastmod>1970-01-01</lastmod>

    </sitemap>

    - <sitemap>
    <loc>http://www.cavalcalonda.com/forum/forum-3.xml</loc>

    <lastmod>1970-01-01</lastmod>

    </sitemap>

    - <sitemap>
    <loc>http://www.cavalcalonda.com/forum/forum-5.xml</loc>

    <lastmod>1970-01-01</lastmod>

    </sitemap>

    </sitemapindex>


  • Super User

    Ciao cavalcalonda,
    a google non devi assolutamente segnalare il file mapforum.php ma il file mapforum.xml che è stato creato in automatico 😉

    Prova ad inserire dagli "strumenti per webmaster" di google, tra le sitemap il file mapforum.xml (ricordati che se il mapforum è sotto la cartella FORUM devi segnalare forum/mapforum.xml).


  • User

    Cionf,se segnalo il file sitemap.xlm : http://www.cavalcalonda.com/forum/sitemap.xml
    google mi conunica Errore 404 : file non trovato,infatti il file non esiste nella directory del mio sito.
    Non viene creato in automatico ?
    Sbaglio qualcosa ?
    Questo è l'indirizzo del mapforum.php :
    http://www.cavalcalonda.com/forum/mapforum.php quello che visualizza ti sembra corretto l'ho postato anche sopra.

    Grazie tanto e scusa se ti "rompo" ...


  • Super User

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