Cita:
Iniciado por ferny Efectivamente da el error 500, pero en otra sección. En la parte #New profiles URL's, en las dos primeras reglas delante del $4 hay un espacio. Lo he eliminado y ya no da error 500. Por supuesto que descomentando esas dos líneas que mencionabas, tampoco da error...
pues eso ya lo corregi pero nada :(
lo raro es que cuando comento esta linea:
RewriteRule ^(.*)$ seo4smf-redirect.php?b=%1&g=%3 [R=301,L]
ya no sale el error, pero lo veo bien :(
por siacaso tambien pongo el archivo seo4smf-redirect.php
Código PHP:
Ver original<?php
require_once('SSI.php');
die('I can\'t find SMF installed !');
$topic = $_GET['t'];
$board = $_GET['b'];
$other = $_GET['o'];
$user = $_GET['u'];
$tpage = $_GET['p'];
$action = $_GET['a'];
$param = $_GET['param'];
$genero = $_GET['g'];
if (isset($modSettings['seo4smf_split_char'])) $split_char = $modSettings['seo4smf_split_char'];
else
$split_char = "_";
{
die ('No parameter given !'); }
else
{
if (strpos($topic, '/') !== false) //until now only VisualWarning is adding / {
}
{
$scripturl1 = str_replace('/index.php', '', $scripturl);
$params = $_SERVER['QUERY_STRING'];
if ($pos > 0)
{
$params = substr($params, $pos+1, $sizep); }
if ($params == "")
$uri = $action.".html";
else
$uri = $action.".html;".$params;
$url = $scripturl1.'/'.$uri;
}
{
$query = db_query("
SELECT m.ID_TOPIC, m.subject ,b.ID_BOARD, b.name
FROM {$db_prefix}messages AS m, {$db_prefix}boards AS b
WHERE m.ID_TOPIC = $topic
AND m.ID_BOARD = b.ID_BOARD
LIMIT 1", __FILE__, __LINE__);
$topic_name = remove_signs($row['subject']);
$board_name = remove_signs($row['name']);
if (empty($topic_name)) $topic_name="empty";
{
$uri = ($modSettings['seo4smf_topic_board'] != 'on'?"$board_name/":'').$topic_name.'-t'.$topic.'.'.$trest.'.html;'.$other;
else
$uri = ($modSettings['seo4smf_topic_board'] != 'on'?"$board_name/":'').$topic_name.'-t'.$topic.'.0.html;'.$trest.';'.$other;
else
$uri = ($modSettings['seo4smf_topic_board'] != 'on'?"$board_name/":'').$topic_name.'-t'.$topic.'.0.html;'.$other;
}
else
{
$uri = ($modSettings['seo4smf_topic_board'] != 'on'?"$board_name/":'').$topic_name.'-t'.$topic.'.'.$trest.'.html';
else
{
$uri = ($modSettings['seo4smf_topic_board'] != 'on'?"$board_name/":'').$topic_name.'-t'.$topic.'.0.html;'.$trest;
else
$uri = ($modSettings['seo4smf_topic_board'] != 'on'?"$board_name/":'').$topic_name.'-t'.$topic.'.0.html';
}
}
$scripturl1 = str_replace('/index.php', '', $scripturl);
$url = $scripturl1.'/'.$uri;
}
{
$query = db_query("
SELECT name FROM {$db_prefix}boards AS b
WHERE ID_BOARD = $board
LIMIT 1", __FILE__, __LINE__);
$board_name = remove_signs($row['name']);
$uri = $board_name.'-b'.$board.'.0/';
$scripturl1 = str_replace("/index.php", "", $scripturl);
$url = $scripturl1.'/'.$uri;
}else{
$query2 = db_query("
SELECT genero FROM {$db_prefix}generos AS g
WHERE ID_GENERO = $genero
LIMIT 1", __FILE__, __LINE__);
$genero_name = remove_signs($row2['genero']);
$uri = $board_name.'-b'.$board.'.0/genero/'.$genero_name.'/';
$scripturl1 = str_replace("/index.php", "", $scripturl);
$url = $scripturl1.'/'.$uri;
}
}
/*
////genero
if (!empty($board) && !empty($genero))
{
$query = db_query("
SELECT name FROM {$db_prefix}boards AS b
WHERE ID_BOARD = $board
LIMIT 1", __FILE__, __LINE__);
$row = mysql_fetch_assoc($query);
mysql_free_result($query);
$board_name = remove_signs($row['name']);
$board_name = strtolower(str_replace(" ", $split_char, $board_name));
$query2 = db_query("
SELECT genero FROM {$db_prefix}generos AS g
WHERE ID_GENERO = $genero
LIMIT 1", __FILE__, __LINE__);
$row2 = mysql_fetch_assoc($query2);
mysql_free_result($query2);
$genero_name = remove_signs($row2['genero']);
$genero_name = strtolower(str_replace(" ", $split_char, $genero_name));
$uri = $board_name.'-b'.$board.'.0/genero/'.$genero_name.'/';
//$uri = $board_name.'-b'.$board.'.0/';
$scripturl1 = str_replace("/index.php", "", $scripturl);
$url = $scripturl1.'/'.$uri;
}
////genero
*/
{
$request = db_query("SELECT memberName FROM {$db_prefix}members where ID_MEMBER=".$user." limit 1", __FILE__, __LINE__);
$scripturl1 = str_replace("/index.php", "", $scripturl);
$uri = "profiles/".$name['memberName']."-u".$user.".html";
{
$uri .= ";".$param;
}
$url = $scripturl1.'/'.$uri;
}
{
$request = db_query("SELECT subject FROM {$db_prefix}tp_articles where id=".$tpage." limit 1", __FILE__, __LINE__);
$scripturl1 = str_replace("/index.php", "", $scripturl);
$page_name = remove_signs($row['subject']);
$uri = $page_name."-p".$tpage.".html";
$url = $scripturl1.'/'.$uri;
}
}
{
header('HTTP/1.1 301 Moved Permanently'); }
else
{
echo 'Is something wrong here ... !';
}
?>