我的 htaccess 代码有问题。
当我尝试加载 example.com/user/register/ 时,读取的页面是 profile.php
当我访问 example.com/user/register 时,它工作正常,它读取 register.php
如何编辑此 htaccess 代码以使用 example.com/user/register/?
RewriteRule ^user/register?$ register.php [L]
RewriteRule ^user/register?$ /user/register/ [R=301,L]
RewriteRule ^user/?$ user.php [L]
RewriteRule ^user?$ /user/ [R=301,L]
RewriteRule ^user/(\d+)/$ profile.php?id=$1 [L]
RewriteRule ^user/(\d+)?$ /user/$1/ [R=301,L]
RewriteRule ^user/([^/]+)/$ profile.php?username=$1 [L]
RewriteRule ^user/([^/]+)?$ /user/$1/ [R=301,L]