我在 htaccess 文件中编写以下规则以将查询字符串更改为目录结构
RewriteRule ^dashboard/([0-9]*)?$ dashboard.php?user_id=$1
用于重写url。它工作正常
localhost/project/dashboard // (dashboard.php)
所有链接都为
localhost/project/css/style.css
localhost/project/js/script.js
但是当我附加一个 id
localhost/project/dashboard/1 // (dashboard.php?user_id=1)
它将所有链接更改为
localhost/project/dashboard/css/style.css
localhost/project/dashboard/js/script.js
为什么将 附加dashboard
到所有链接