1

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?

Greg
  • 481
  • 1
  • 5
  • 21

2 Answers2

1

You've got it right (almost). Just change your code by this:

RewriteRule ^photo/(.+)$ photo.php?id=$1 [L,NC,QSA]
anubhava
  • 761,203
  • 64
  • 569
  • 643
0

try this more easy one:

RewriteEngine on
RewriteRule ^photo/(.*)$ photo.php?id=$1
senk
  • 44
  • 4