views:

16

answers:

1

I need help rewriting

online.php to -> /users/online

and

profile.php?id=3426 to -> /users/3426

and

users.php to -> /users

Would this be possible?

And is there any good mod_rewrite cheat sheets out there?

+1  A: 

Here are the rules to get you started, I've assumed you want the visitor to see "users/online/" but actually deliver the content from online.php.

Because you are using the "users/" pseudo address for each of these, it is reasonably important what order you place the rules in.

RewriteEngine on
RewriteRule ^users/ users.php [L,NC,QSA]
RewriteRule ^users/online/ online.php [L,NC,QSA]
RewriteRule ^users/([^/\.]+)/?$ profile.php?Page=$1 [L,NC,QSA]
Sohnee