我的用户如何通过http://www.example.com/test查看他们的个人资料 而不是http://www.example.com/profile?username=test
使用.htaccess
答案 0 :(得分:0)
来吧男人。这个例子可能有很多问题。这真是个常见问题。这应该告诉我。 :)
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+) /profile?username=$1