I'm looking for help creating a mod_rewrite rule for my website.
Here is an example of what the current link looks like http://soccersurfer.com/profile.php?id=3 and I would like it turn into something like http://socce开发者_如何学JAVArsurfer.com/players/cristiano-ronaldo/. I have a lot of links like this, so it's not as simple as doing it for one, but for "profile.php?id=X" where X is the profile number.
Any help would be appreciated.
Thanks
The easier way would be:
RewriteRule ^/players/(.*?)/$ profile.php?name=$1
And in profile.php, add a possible argument (the name one) which lets you search the player in the database by his name rather than his ID.
精彩评论