0
我需要從根重寫用戶到index.php因爲現在在谷歌分析我看到2號線:Nginx的用戶重定向從/到index.php
/ ............. 112
/index.php ............. 34
我如何可以重定向誰打開http://example.com和http://example.com/用戶http://example.com/index.php ?
我需要從根重寫用戶到index.php因爲現在在谷歌分析我看到2號線:Nginx的用戶重定向從/到index.php
/ ............. 112
/index.php ............. 34
我如何可以重定向誰打開http://example.com和http://example.com/用戶http://example.com/index.php ?
這種方式爲我工作:
location =/{
return 301 /index.php;
}
看到http://nginx.org/en/docs/http/ngx_http_index_module.html#index – Lution