2011-10-21 26 views
0

我怎么做,从nginx的重写:添加的index.php

http://www.example.com (with or without trailing slash) 

在nginx的重写,以在最后添加的index.php?

对于结果上面的例子应该是

http://www.example.com/index.php 

并没有硬性规定,只是一个域名change.This应该是简单,但我似乎无法弄清楚:-(

!谢谢

回答

1

假设你的意思是你希望用户的地址栏改变,你只需要一个额外的位置在您的服务器块:

location =/{ 
    return 301 http://www.example.com/index.php; 
}