Reputation: 479
i want to make
mysite.com/photo.php?id=l0el2rwbFj7kGG3
become
mysite.com/photo/l0el2rwbFj7kGG3
The rewrite i am using is
RewriteEngine On
RewriteRule ^photo/([a-zA-Z0-9]+) photo.php?id=$1 [L,NC]
Can anyone help me out please?
Upvotes: 1
Views: 82
Reputation: 44
try this more easy one:
RewriteEngine on
RewriteRule ^photo/(.*)$ photo.php?id=$1
Upvotes: 0
Reputation: 784898
You've got it right (almost). Just change your code by this:
RewriteRule ^photo/(.+)$ photo.php?id=$1 [L,NC,QSA]
Upvotes: 1