問題:
其實3個問題類似
1.MAMP PRO for mac中如何配置nginx中的try_file的值?
2.tp5.1在MAMP PRO中配置nginx的路由忽略index.php的重定向配置?
3.如何在MAMP PRO中配置nginx上的僞靜態規則?
環境:
系統:mac mini v10.11.5
MAMP PRO for mac : 4.4.1 (9605)
tp版本:TP5.1.39
這是官方提供的nginx 上 URL重寫隱藏應用的入口文件index.php的規則:
location /youdomain/ {
if (!-e $request_filename){
rewrite ^/youdomain/(.*)$ /youdomain/index.php?s=/$1 last;
}
}
這是我的nginx 上 URL重寫隱藏應用的入口文件index.php的規則:
location /youdomain/ {
if (!-e $request_filename){
rewrite ^/(.*)$ /index.php?s=/$1 last;
}
}