我正在尋找?guī)в?_GET參數(shù)的另一個子目錄中的子目錄的目錄內(nèi)容。這是一個例子:從:https://example.com/john至:https://example.com/user/index.php?username=john我不希望它重定向,只顯示/user/index.php?username=john.我還想確保如果文件存在,則改為顯示該文件。例如,https://example.com/about不會顯示/user/...目錄,因為頁面存在。我怎樣才能做到這一點?
1 回答

米脂
TA貢獻1836條經(jīng)驗 獲得超3個贊
這就是你要找的:
RewriteRule ^([a-zA-Z0-9_-]+)$ /user/index.php?username=$1 [QSA]
- 1 回答
- 0 關(guān)注
- 106 瀏覽
添加回答
舉報
0/150
提交
取消