I want to change URL like below:
http://localhost/register/profile.php?user_id=23
to:
http://localhost/register/username
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Consider a user of id 23 and username “foo“. The easiest is to rewrite /register/23/foo to /register/profile.php?user_id=23 as such:
But if you can change profile.php to rely on
$_GET['username']rather than$_GET['user_id'], you can rewrite /register/foo to /register/profile.php?username=foo. Use this rule: