2
Url https://example.com/profile/chico
必须被nginx理解为: https://example.com/profile/?username=chico
(当前工作的url)。翻译的url路径查询nginx的参数
https://example.com/profile/
当前工作为好,因为它解决了目前到index.php,没有用户名PARAM。
我现在有
location /profile/ {
index /profile/index.php;
}
有在网络上关于这个很多不同的东西,我没有具体是什么,我需要找到。
也试过
location /profile/ {
rewrite ^/profile/(.*)$ /profile/?username=$1;
}
谢谢你,走近了404(例如/profile/assets/js/main.js工作,页面使用用户名VAR实际负载,但在资产上的页面结果不能被发现,同样的图像和css文件) –
好的,没有意识到你在那个位置有静态内容。答案已更新。 –
太棒了。谢谢。 –