Ver Mensaje Individual
  #1 (permalink)  
Antiguo 27/05/2008, 11:18
Okiro
 
Fecha de Ingreso: mayo-2005
Mensajes: 51
Antigüedad: 19 años
Puntos: 0
Problema con Mod rewrite

Hola buenas.

Tengo un pequeño problema.

Estoy intentando hacer mod rewrite para hacer que mi web sea más visible en google.

Hasta el momento he logrado que la dirección de la web ya no sea ?ID=...etc sino que recoga de la variable título el contenido que muestre en el navegador.

El tema es que al pulsar en el enlace la web me muestra este error:

You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 0, 10' at line 1



Esta sería la linea que esta en el index.php y que enlaza hacia ampliar_noticia.php:

<a href="<? echo fixurltitle($row_central['titulo_noticia']); ?>-num<? echo $row_central['id_noticia'] ?>.html" target="_self "><? echo $row_central['titulo_noticia']; ?></a>

en la parte superior del codigo he insertado este codigo para anular los % en el titulo largo

<?php
function fixurltitle($string) {
$string = strtolower(htmlentities($string));
$string = preg_replace("/&(.)(acute|cedil|circ|ring|tilde|uml);/", "$1", $string);
$string = preg_replace("/([^a-z0-9]+)/", '-', html_entity_decode($string));
$string = trim($string, '-');
if (strlen($string)<1){$string= 'pagina';}
return strtolower($string);
}
?>


y el .htaccess es el siguiente:

Options +FollowSymLinks
RewriteEngine on
RewriteRule ^(.+)-num([0-9]+) ampliar_noticia.php?ID=$1



la web para que veais el Fallo en directo es esta www.putasexual.com


Por favor, haber si me podeis hechar una ayudica....muchas gracias!!!

Última edición por Okiro; 27/05/2008 a las 11:30