r/PHPhelp • u/change_theworld • Mar 06 '14
How to customize URL [PHP]
How can I rewrite URL for user profiles to show their name instead of their id.
What it shows currently:
What I want to show:
What is the best way to accomplish this.
9
Upvotes
4
u/samyel Mar 06 '14
The short answer is mod_rewrite for apache and nginx's http rewrite module.
The longer, more complete answer is PHP Routing. Googling this would help you understand more about it, at a quick search this stackoverflow answer might help you.
Personally, I quite like dispatch.