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文件) –
好的,沒有意識到你在那個位置有靜態內容。答案已更新。 –
太棒了。謝謝。 –