Nginx将用户从/重定向到index.php

时间:2016-07-13 06:43:06

标签: nginx

我需要将用户从root重写为index.php,因为现在在谷歌分析中我看到2行:

/            .............  112 
/index.php   .............  34

如何将打开http://example.comhttp://example.com/的用户重定向到http://example.com/index.php

1 个答案:

答案 0 :(得分:0)

这样对我有用:

location = / {
    return 301  /index.php;
}
相关问题