Nuevas NORMAS para el foro

Curso Hacker
Bienvenido(a), Visitante. Favor de ingresar o registrarse. - Mayo 16, 2008, 01:27:28
Boton Buscar
Inicio Ayuda Calendario Ingresar Registrarse
Visita: Articulos - Juegos Gratis - Da Foros

Comunidad Underground Hispana  |  Programacion  |  Programacion para webmasters  |  Scripts Pre-Fabricados (Moderador: robert66)  |  Tema: Solucionar el problema de los .html en smf 0 Usuarios y 1 Visitante están viendo este tema. « anterior próximo »
Páginas: [1] Ir Abajo Imprimir
Autor Tema: Solucionar el problema de los .html en smf  (Leído 97 veces)
aBsTrAcTo
Administrador
Gran Colaborador
*****
Desconectado Desconectado

Mensajes: 1785

Es que te quiero hoo

12343564 el-hacker@el-hacker.org
Ver Perfil WWW
« en: Noviembre 08, 2007, 04:38:26 »

Bueno. esta falla esta en smf desde hace ya varias versiones.

Aparentemente siempre nos muestra .html (si esta habilitado) Pero "aparentemente" por que siempre nuestra primer visita va a salir mal ya que los enlaces nos los muestra /foro/index.php?PHPSESSID=xxxxxxxx

Cuando se crea la cookie. ahi ya podemos ver html siempre.. elimininas tu cookie y vuelve a salir este detalle.

El problema aqui es. 1.- Como a googlebot no le vas a meter cookie. siempre ira cacheando tus urls con ?board= ?topic=

Las urls que cachea con .html son las que estan añadidas de modo manual en post, plantillas. o enlaces.

Busquen en querystring.php    // Debugging templates, are we?


Y de ahi al final. remplacen por
Código:
// Debugging templates, are we?

elseif (isset($_GET['debug']))

$buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '\?((?:board|topic)=[^#"]+?)(#[^"]*?)?"/e', "'\"' . \$scripturl . '/' . strtr('\$1', '&;=', '//,') . '.html\$2\"'", $buffer);



// This should work even in 4.2.x, just not CGI without cgi.fix_pathinfo.

if (!empty($modSettings['queryless_urls']) && (!$context['server']['is_cgi'] ||  @ini_get('cgi.fix_pathinfo') == 1) && $context['server']['is_apache'])

{

// Let's do something special for session ids!

if (defined('SID') && SID != '')

$buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '\?((?:board|topic)=[^#"]+?)(#[^"]*?)?"/e', "'\"' . \$scripturl . '/' . strtr('\$1', '&;=', '//,') . '.html\$2\"'", $buffer);

else

$buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '\?((?:board|topic)=[^#"]+?)(#[^"]*?)?"/e', "'\"' . \$scripturl . '/' . strtr('\$1', '&;=', '//,') . '.html\$2\"'", $buffer);

}



// Return the changed buffer.

return $buffer;

}



?>

Con esto ya tus urls con html seran cacheables.

Tambien es cacheable con sitemaps de googlehttp://www.google.com/webmasters/sitemaps/?hl=es
En línea

+52 9932399664 luis =)

Para ver los enlaces debes ser usuario Crear Usuario o Hacer Sesion
Páginas: [1] Ir Arriba Imprimir 
Comunidad Underground Hispana  |  Programacion  |  Programacion para webmasters  |  Scripts Pre-Fabricados (Moderador: robert66)  |  Tema: Solucionar el problema de los .html en smf « anterior próximo »
Ir a:  
Novedades, Dudas, Comentarios Y Sugerencias, Top 100, Off-Topic, Revista E-Zine, Revista E-Zine, Sistemas operativos libres. , HacK GeneraL, Phreaking, Bug y Exploits, Networking & Wireless, Overclocking, Refrigeracion y demas, Hardware, Electronica Y Robotica, Hack para newbies, Todo Messenger, Troyanos y virus, Programacion, Programacion para webmasters, Software, Cracks & Serialz, P2p, Bittorrent, Elinks, Diseño Grafico, Juegos PC, Mp3, Multimedia, Peliculas Divx, Juegos, Humor y Adultos. (Diversion), Paginas Webs Recomendadas, Videos,


Zona-Musical Juegos online Juego Gratis10 Solucion Hosting Videos De Musica 1juegogratis Dragonjar
Noticias
 Juegos De Coche juegos gratis online juegos Los Foros De Sexe Gratuit Sexo Duro Tierra Messenger Trucos
Ranking-Hits
Powered by SMF 1.1.5 | SMF © 2006-2007, Simple Machines LLC