Ver Mensaje Individual
  #10 (permalink)  
Antiguo 18/12/2012, 21:00
Avatar de emprear
emprear
Colaborador
 
Fecha de Ingreso: junio-2007
Ubicación: me mudé
Mensajes: 8.388
Antigüedad: 16 años, 10 meses
Puntos: 1567
Respuesta: El .htaccess se volvio loco...

algo asi

Código Apache:
Ver original
  1. Options +FollowSymLinks
  2. RewriteEngine On
  3. RewriteRule ^ofertas/(.*)/(.*)$ /detalle_ofertas.php?titulo=$1&codigo=$2 [L]

y tus links

Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <title>Catálogo</title>
  5. <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  6. </head>
  7. <p>
  8. <a href="/ofertas/camisa/5657">Camisa</a><br />
  9. <a href="/ofertas/remera/4533">Remera</a><br />
  10. </p>
  11. </body>
  12. </html>


detalle_ofertas.php

Código PHP:
Ver original
  1. Ofertas<br>
  2. <?php
  3. echo "Producto: " . $_GET['titulo'];
  4. echo "<br>";
  5. echo "Codigo: " . $_GET['codigo'];
  6. ?>

/ofertas no es una carpeta real sino que actua como un prefijo

demo:
http://mr8.emprear.com/catalogo.php

Saludos
__________________
La voz de las antenas va, sustituyendo a Dios.
Cuando finalice la mutación, nueva edad media habrá
S.R.