Ver Mensaje Individual
  #1 (permalink)  
Antiguo 24/09/2008, 02:26
ferranWEB
 
Fecha de Ingreso: enero-2002
Mensajes: 1.872
Antigüedad: 22 años, 3 meses
Puntos: 3
Ayuda o sugerencia con webs amigables en php

Buenas a todos,

he conseguido montar el tema de las webs amigables, interesante!! y ahora quiero a ver si alguien me da su consejo.

tengo montado un sistema de noticias. tengo un listado de articulos, y al clcickar ver aticulo muestro el resultado (le paso el id).

tengo un codigo tal que asi:

Código:
$tituloURL=str_replace (" ", "-", $_GET['titulo']);


if (isset($_GET['idnoticia'])) {
	
	$nuevaurl = $_SERVER['PHP_SELF']."/".$_GET['idnoticia']."/".$tituloURL.".html";
	header("Location: ".$nuevaurl);
	}
else {
	$idnoticia = $var_array[1];
	$titulo = $var_array[2];

}
y esto me pinta en pantalla:

dominio.com/noticia.php/2/DNDE-ENCONTRAR-EMPLEO.html

mi preguntas son:

no podria quitar la URL? es decir, no podria quedarme algo como:

dominio.com/noticias/DNDE-ENCONTRAR-EMPLEO.html

he intentado quitar el PHP_SELF pero entonces no me funciona:

$nuevaurl = "noticias/".$_GET['idnoticia']."/".$tituloURL.".html";ç

lo que no quiero que se vea es el noticia.php?id=1

saludos!!

ferranWEB