Foros del Web » Programando para Internet » PHP »

sistema rss no me funciona con url amigables

Estas en el tema de sistema rss no me funciona con url amigables en el foro de PHP en Foros del Web. Hola, estoy probando a poner un sistema rss en un blog que estoy haciendo pero y me funciona todo bien salvo los links con url ...
  #1 (permalink)  
Antiguo 30/04/2012, 18:27
 
Fecha de Ingreso: mayo-2010
Mensajes: 128
Antigüedad: 14 años
Puntos: 13
sistema rss no me funciona con url amigables

Hola, estoy probando a poner un sistema rss en un blog que estoy haciendo pero y me funciona todo bien salvo los links con url amigables. Pongo el código:

Código PHP:
<?php
header
("Content-Type: application/rss+xml"); 
echo 
"<?xml version='1.0' encoding='iso-8859-1'?>";
?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
  <channel> 
    <title><![CDATA[Petrogrado - Blog de noticias]]></title> 
    <link><![CDATA[<?php Conectar::ruta();?>index.php]]></link> 
    <description><![CDATA[Petrogrado - Blog de noticias]]></description>
    <language>es-es</language> 
    <copyright><![CDATA[Petrogrado]]></copyright>
    <atom:link href="<?php echo Conectar::ruta()?>index?accion=rss" rel="self" type="application/rss+xml" />
    <ttl>15</ttl> 

    <image>
        <url>http://www.cesarcancino.com/local/images/tutti/cesar.jpg</url>

        <title>Petrogrado - Blog de noticias</title>
        <link><?php echo Conectar::ruta()?>index.php</link>
    </image>
<?php
$limit
'LIMIT '',' 15;
$datos=$not->get_noticias(0,$limit);
for (
$i=0;$i<sizeof($datos);$i++)
{
$nummes=substr($datos[$i]["fecha_not"],6,2); //Guardamos los números del mes en una variable    
?>        
<item>
<title>
<![CDATA[<?php echo $datos[$i]["titulo_not"];?>]]>
</title>
<link>
<![CDATA[<?php echo "detalle.php?id_noticia=".$datos[$i]["id_noticia"];?>]]>
</link>
<description>
<![CDATA[<div align='justify'><?php echo $datos[$i]["detalles_not"];?></div>]]>
</description>
<guid isPermaLink="true">
<?php 
//ENTIENDO QUE AQUI ESTA EL FALLO !!
Conectar::ruta();?>blogspot/<?php echo $not->convertir_seo($not->limpiar_especiales($datostotal[$i]["titulo_not"]));?>/<?php echo $datostotal[$i]["id_not"];?>-<?php echo $not->convertit_fecha($nummes);?>-0.html
</guid>
<author>
<![CDATA[corrweo (nombre)]]>
</author>
<pubDate>
<![CDATA[<?php echo $datos[$i]["fecha_not"];?>]]>
</pubDate>
</item>
<?php
 
}
 
?>
  </channel>

</rss>
Sin url amigable sería así:

<guid>
<?php echo Conectar::ruta();?>index.php?accion=blogpost&titul o=<?php echo $not->convertir_seo($not->limpiar_especiales($datostotal[$i]["titulo_not"]));?>&id=<?php echo $datostotal[$i]["id_not"];?>&mes=<?php echo $not->convertit_fecha($nummes);?>&idcat=0.html
</guid>

Y funciona perfecto, pero con url amigable toma esta direccion siempre:

http://localhost/Petrogrado/index.php

Por cierto Conectar::ruta es igual a http://localhost/Petrogrado/

Lo pongo así para que cuando tenga que subir la web a internet no tenga que ir cambiando los links en cada página.
__________________
http://www.anunciospc.es
  #2 (permalink)  
Antiguo 01/05/2012, 05:50
 
Fecha de Ingreso: mayo-2010
Mensajes: 128
Antigüedad: 14 años
Puntos: 13
Respuesta: sistema rss no me funciona con url amigables

Es curioso, porque lo he probado en Internet Explorer y funciona perfectamente, pero en Firefox me salen las noticias pero todas me mandan al index en lugar del al artículo en cuestión.
__________________
http://www.anunciospc.es

Etiquetas: amigables, html, rss, sistema, url, variables
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 00:49.