在user_id 1位置单击用户 John Smith 它应该转到 URL www.example.com/John-Smith 而不是 profile.php?uid=1
当您单击user_id 2 中的用户 John Smith 时,它应该转到网址 www.example.com/John-Smith-2 profile.php?uid=2
当您单击user_id 3 中的用户 Kia Dull 时,它应该转到网址 www.example.com/Kia-Dull profile.php?uid=3
Table Users
User_id First_name last_name
1 John Smith
2 John Smith
3 Kia Dull
如何为此格式化我的 .Htaccess 文件和 php/sql。
单击用户配置文件时,我只是将其引导到此处。
<a href="<?php echo $row[first_name] ?>-<?php echo $row[last_name] ?>"
这没有任何作用。
这是我的 .htaccess
RewriteEngine on
RewriteBase /
RewriteRule ^(.*)$ profile.php?uid=$1 [L]