Page 1 of 1

friendly url

Posted: Thu Jul 09, 2009 9:08 am
by delibertad
hello team,

nice too meet you, I'm form Costa Rica.
well... since three hours ago I has been trying to gets user be redirect from a link like this:
example.com/show.php?id=10
to:
example.com/page/10

Ok? let me explain.. If I access to example.com/page/10 the web browser shows the content of example.com/show.php?id=10, but if I access to example.com/show.php?id=10 the web browser doesn't "redirect" to example.com/page/10 and doens't not change the url in the adress bar.
I use a .htaccess file:

Code: Select all

 
Options +FollowSymLinks
RewriteEngine On
 
RewriteRule page/(.*)$ show.php?id=$1 [R=301,L]
 
how can I get user be redirect from ugly url to pretty url?

thanks :)

Re: friendly url

Posted: Thu Jul 09, 2009 3:09 pm
by Darhazer
You have to use a RewriteCond with %REQUEST_URI to check the address in the address bar, and make a redirect... and the other (existing one) rule should be without the redirect