On Tue, Apr 14, 2009 at 3:32 PM, ricardo13 <ricardoogrande@xxxxxxxxx> wrote: > > Hi all, > > I have other doubt about mod_rewrite. > > Have this line in httpd.conf: > > RewriteEngine on > RewriteRule ^/index/([0-9]+)/$ /index.html?id=$1 > > When type "http://localhost/index.html?id=11" it doesn't show URL > "http://localhost/index/11/" > I saw this example in a site. > > What's happen ??? > > Ricardo > -- It looks like you're trying to do what's called "pretty URLS"; the idea is to hide some ugly details about how your site actually works (like passing query string values to a server side script) inside an easier to remember and more natural looking URL. The being the case, you would not generally want your users to enter "http://localhost/index.html?id=11" as the URL, because that's not very pretty. It's much nicer for a user to browse to "http://localhost/index/11/" and have that handled correctly, which is exactly how you have your RewriteRule set up. So it looks like your rule is probably correct, you just misunderstood what it's used for. -Brian -- Feel free to contact me using PGP Encryption: Key Id: 0x3AA70848 Available from: http://keys.gnupg.net --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx