views:

174

answers:

2

I want to make my user profiles 'pretty' as it were. Here is the regular URL:

user.php?user=UserName

I want this to become:

user/Username

Please help :) Im a .htaccess newbie.

+1  A: 
RewriteRule ^user/(.+)$ user.php?user=$1 [L,QSA]
Ayman Hourieh
+1  A: 

Try these directives:

RewriteEngine on
RewriteRule ^user/([^/]+)$ user.php?user=$1 [L,QSA]

This rule rewrites any request with a URL path of the form /user/foobar internally to /user.php?user=foobar.

Gumbo
Wonderful, thank you :)
Ben Shelock