Ver Mensaje Individual
  #1 (permalink)  
Antiguo 18/10/2012, 01:45
Avatar de jonathanzuniga
jonathanzuniga
 
Fecha de Ingreso: octubre-2012
Ubicación: Tijuana
Mensajes: 1
Antigüedad: 11 años, 6 meses
Puntos: 0
Pregunta Cambiar direcciones por medio de .htaccess

Hola, ¿como podria cambiar estas tres direcciones a una forma mas amigable?

http://localhost/micms/?action=archive
http://localhost/micms/?action=viewArticle&articleId=6
http://localhost/micms/?action=archive&categoryId=3

lo he intentado con lo siguiente:

<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f

RewriteRule ^([a-zA-Z0-9-]*)/([a-zA-Z0-9-]*)/?$ ?action=$1&articleId=$2 [L]
RewriteRule ^([a-zA-Z0-9-]*)/([a-zA-Z0-9-]*)/?$ ?action=$1&categoryId=$2 [L]
</IfModule>

sin embargo solo funciona con la primera direccion:
http://localhost/micms/archive/

y curiosamente la segunda dir. solamente si es el articulo 2:
http://localhost/micms/viewArticle/2

tambien, ¿que debo hacer para que al escribirla en la barra del navegador no se vuelva a cambiar?

¿como lo hago? agradezco sus respuestas.