我有一个个人资料系统。我将 example.com/player/?id=1 重定向设置为 example.com/player/1,我想知道重定向后如何知道其用户 ID 号 1?而不是让我的网站出现 404 错误。
.htaccess
# Make bloxplays.com/profile/?id=1 to bloxplays.com/profile/1
RewriteCond %{THE_REQUEST} ^(GET|HEAD)\ /player/([^\?]*)\?id=([^&\ ]+)([^\ ]*)
RewriteRule ^ /player/%3/%2?%4 [L,R=301]
慕标5832272