Visualizzazione Stampabile
-
Configurare sitemap
Ragazzi, ho abilitato la sitemap dalle impostazioni, ho creato la cartella nella root ed impostati i permessi 777. ho avviato la prima costruzione della sitemap (infatti nella cartella sitemap ha creato i pirmi files).
l'url di riferimento è www.sito.it/forum/xmlsitemap.php ??
perchè aggiungendolo su google diceERRORE
La Sitemap è in formato HTML
Sembra che la tua Sitemap sia una pagina HTML. Utilizza un formato Sitemap supportato.
-
Aggiungi nel file .htaccess:
RewriteRule ^sitemap.xml$ forum/xmlsitemap.php
e indichi a Google di prendere sitemap.xml
Richiede mod_rewrite e le solite impostazioni preliminari ... :)
-
Citazione:
Originariamente Scritto da
y2ksw
Aggiungi nel file .htaccess:
RewriteRule ^sitemap.xml$ forum/xmlsitemap.php
e indichi a Google di prendere sitemap.xml
Richiede mod_rewrite e le solite impostazioni preliminari ... :)
Nella root non funziona, sono andato nella dir /forum e nel file .htaccess ho inserito
RewriteRule ^sitemap.xml$ xmlsitemap.php
Andando alla pagina www.sito.it/forum/sitemap.xml scarica il file vbulletin_site_index.xml, ma se a google gli passo questo url mi rispode:
La Sitemap è in formato HTML
Sembra che la tua Sitemap sia una pagina HTML. Utilizza un formato Sitemap supportato.
Ho provato anche ad inserire: RewriteRule ^sitemap.php$ xmlsitemap.php e passargli sitemap.php ma stesso errore.
Come posso fare?
Grazie
-
Citazione:
Originariamente Scritto da
iettafune
Nella root non funziona, sono andato nella dir
/forum e nel file
.htaccess ho inserito
RewriteRule ^sitemap.xml$ xmlsitemap.php
Andando alla pagina
www.sito.it/forum/sitemap.xml scarica il file
vbulletin_site_index.xml, ma se a google gli passo questo url mi rispode:
La Sitemap è in formato HTML
Sembra che la tua Sitemap sia una pagina HTML. Utilizza un formato Sitemap supportato.
Ho provato anche ad inserire:
RewriteRule ^sitemap.php$ xmlsitemap.php e passargli sitemap.php ma stesso errore.
Come posso fare?
Grazie
Prova questo codice; crea un file php con nome a tua scelta e fai il redirect a quel file:
Codice PHP:
<?php
/*============================================================================*\
|| ########################################################################## ||
|| # OdiSEO Sitemap # ||
|| # ---------------------------------------------------------------------- # ||
|| # (C) Copyright Y2K Software s.a.s. 2010 - All Rights Reserved. # ||
|| # This file may not be redistributed in whole or significant part. # ||
|| ########################################################################## ||
\*============================================================================*/
/**
* @author Y2K Software
* @copyright (C) Copyright Y2K Software 2010 - All Rights Reserved
* @version 1.0.0
* @link www.pagerobot.com
*/
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~ E_NOTICE);
@ini_set('zlib.output_compression', 'Off');
@set_time_limit(0);
if(@ini_get('output_handler') == 'ob_gzhandler' && @ob_get_length() !== false)
{
// if output_handler = ob_gzhandler, turn it off and remove the header sent by PHP
@ob_end_clean();
header('Content-Encoding:');
}
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('THIS_SCRIPT', 'xmlsitemap');
define('BYPASS_FORUM_DISABLED', true);
define('CSRF_PROTECTION', true);
// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array();
// get special data templates from the datastore
$specialtemplates = array();
// pre-cache templates used by all actions
$globaltemplates = array();
// pre-cache templates used by specific actions
$actiontemplates = array();
// ######################### REQUIRE BACK-END ############################
require_once ('./global.php');
// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################
$sitemap_path = $vbulletin->options['sitemap_path'];
$sitemap_filename = '';
if(file_exists($sitemap_path . '/vbulletin_sitemap_index.xml.gz'))
{
$sitemap_filename = 'vbulletin_sitemap_index.xml.gz';
} elseif(file_exists($sitemap_path . '/vbulletin_sitemap_index.xml'))
{
$sitemap_filename = 'vbulletin_sitemap_index.xml';
}
$filename = "$sitemap_path/$sitemap_filename";
if($sitemap_filename && file_exists($filename))
{
if(substr($sitemap_filename, -3) == '.gz')
{
header('Content-Transfer-Encoding: binary');
header('Content-Encoding: gzip');
}
header('Accept-Ranges: bytes');
$filesize = sprintf('%u', filesize($filename));
header("Content-Length: $filesize");
header('Content-Type: text/xml');
readfile($filename);
}
-
Allegati: 1
Alla fine, ieri ho installato il plugin free vBSEO Search Engine XML Sitemap
Con questo, sono riuscito a passare a google la sitemap creata, ma non ha indicizzato ancora nessuna pagina, e nel sito, non è arrivato nessun spider (ricordo che col vecchio forum vb3, quando misi la sitemap su google, arrivarono moltissimi spider).
Forse devo aggiungere qualcosa in robot.txt o altrove?
Grazie
(questo è il risultato su google)
Allegato 724