Reputation: 450
Alright, how would I get something like:
domain.com/friends.php?id=Fred
Into something like:
domain.com/Fred/friends.php
Previously, I have used:
RewriteRule ^([A-Za-z0-9]+)$ profile.php?id=$1 [L]
To turn
domain.com/profile.php?id=Fred
Into
domain.com/Fred
I know there is a way to do it, I just don't have the knowledge of the operators that would put that extra 'friends.php' in the RewriteRule. Thanks for the help, if my explanation made sense.
Upvotes: 2
Views: 519
Reputation: 44841
You're close:
RewriteRule ^([A-Za-z0-9]+)/friends\.php$ friends.php?id=$1 [L]
Upvotes: 1