Antes de crear y subir los archivos haga un respaldo de su .htaccess e includes/page_tail.php.
includes/page_tail.php:
Código: Seleccionar todo
' . $lang['Admin_panel'] . '
' : '';
$template->set_filenames(array(
'overall_footer' => ( empty($gen_simple_header) ) ? 'overall_footer.tpl' : 'simple_footer.tpl')
);
$template->assign_vars(array(
'PHPBB_VERSION' => '2' . $board_config['version'],
'TRANSLATION_INFO' => ( isset($lang['TRANSLATION_INFO']) ) ? $lang['TRANSLATION_INFO'] : '',
'ADMIN_LINK' => $admin_link)
);
$template->pparse('overall_footer');
//
// Close our DB connection.
//
$db->sql_close();
//
// Compress buffered output if required and send to browser
//
if ( $do_gzip_compress )
{
//
// Borrowed from php.net!
//
$gzip_contents = ob_get_contents();
ob_end_clean();
$gzip_size = strlen($gzip_contents);
$gzip_crc = crc32($gzip_contents);
$gzip_contents = gzcompress($gzip_contents, 9);
$gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4);
echo "\x1f\x8b\x08\x00\x00\x00\x00\x00";
echo $gzip_contents;
echo pack('V', $gzip_crc);
echo pack('V', $gzip_size);
}
$pagecontent = ob_get_contents();
ob_end_clean();
echo replace_html_links($pagecontent);
exit;
/**
* Function: replace_html_links
*
* Author: Kinetix
*
* Version: 1.0.0
*
* Purpose: Transforms page content's links into .html pages
* to allow better caching in Google.
*
* Notes: This will NOT work properly if you do not use & for
* the & character in links.
*/
function replace_html_links($pagedata)
{
// Whatever you want to replace has to be in the same index as
// whatever you are going to replace it with in the changearray
$replacearray = array(
"'(?
.htaccess:
Código: Seleccionar todo
# you should deny these files anyway, this stops people from taking theme templates
deny from all
Order Allow,Deny
Allow from all
RewriteEngine on
RewriteRule foros.html index.php
RewriteRule ^foro.([0-9]+)-([0-9]+)-([0-9]+).html viewforum.php\?f=$1&topicdays=$2&start=$3
RewriteRule ^foro.([1-9][0-9]*).html viewforum.php\?f=$1
RewriteRule ^mirar-tema.([0-9]*)-([a-zA-Z]*)-([0-9]+).html viewtopic.php\?t=$1&$2=topic&start=$2
RewriteRule ^viewtopicres.([0-9]+)-([0-9]+)-([a-zA-Z]*)-([a-zA-Z0-9_]*).html viewtopic.php\?t=$1&postdays=$2&postorder=$3&vote=$4
RewriteRule ^mensaje.([0-9]+)-([0-9]+)-([0-9]+).html viewtopic.php\?t=$1&start=$2&postdays=$3&highlight=
RewriteRule ^mensaje.([0-9]+)-([0-9]+)-([0-9]+)-([a-zA-Z]*).html viewtopic.php\?t=$1&start=$2&postdays=$3&postorder=$4&highlight=
RewriteRule ^viewtoph.([0-9]*)-([[:punct:]/:\-\'(){}.&=_a-zA-Z0-9\ ]*).html viewtopic.php\?t=$1&highlight=$2
RewriteRule ^viewtopx.([0-9]*)-([0-9]*).html viewtopic\?t=$1&start=$2
RewriteRule ^viewtopp.([0-9]*)-([0-9]*)-([a-zA-Z]*)-([0-9]*).html viewtopic.php\?t=$1&postdays=$2&postorder=$3&start=$4
RewriteRule ^ver-mensaje.([0-9]+)-([0-9]+)-([0-9]+).html viewtopic.php\?t=$1&postdays=$2&postorder=asc&start=$3
RewriteRule ^ver-tema.([1-9][0-9]*).html viewtopic.php\?t=$1
RewriteRule ^ver-mensaje.([1-9][0-9]*).html viewtopic.php\?p=$1
RewriteRule buscar.([a-zA-Z0-9_]*)-([a-zA-Z0-9_]*)-([a-zA-Z0-9_]*)-([a-zA-Z0-9_]*).html search.html\?$1=$2&$3=$4
RewriteRule buscar.([a-zA-Z0-9_]*)-([a-zA-Z0-9_]*).html search.html\?$1=$2
RewriteRule buscar.html search.html
RewriteRule lista-miembros.([a-zA-Z0-9]*)-([a-zA-Z]*)-([0-9]*).html memberlist.html\?mode=$1&order=$2&start=$3
RewriteRule lista-miembros.html memberlist.html
RewriteRule faq.([a-zA-Z0-9]*).html faq.html\?mode=$1
RewriteRule faq.html faq.html
RewriteRule grupos.([0-9]*)-([0-9]*).html groupcp.html\?g=$1&start=$2
RewriteRule grupos.([0-9]*).html groupcp.html?g=$1
RewriteRule grupos.html groupcp.html
RewriteRule ver-perfil.([0-9]*).html profile.php\?mode=viewprofile&u=$1
RewriteRule editar-perfil.html profile.php\?mode=editprofile
RewriteRule mensajes.html privmsg.php\?folder=inbox
RewriteRule enviar-mensaje.html privmsg.php\?mode=post
RewriteRule elementos-enviados.html privmsg.php\?folder=sentbox
RewriteRule mensajes-enviados.html privmsg.php\?folder=outbox
RewriteRule elementos-guardados.html privmsg.php\?folder=savebox
RewriteRule responder.([1-9][0-9]*).html posting.php\?mode=reply&t=$1
RewriteRule nuevo-tema.([1-9][0-9]*).html posting.php\?mode=newtopic&f=$1