只有当用户没有URI时,我如何才能将用户发送到新位置?我想后续,但它不工作...它总是送我去/ newlocationNginx重写:只更改索引位置?
rewrite ^/$ http://www.domain.com/newlocation permanent;
rewrite ^/(.*)$ http://www.domain.com/$1 permanent;
所以基本上,我需要的是:
如果用户浏览器的www.domain写道。 org发送到www.domain.com/newlocation 如果用户在浏览器上写道www.domain.org/something它发送到www.domain.com/something
谢谢!
这对我有用 – isuldor 2014-12-16 19:21:14