只有當用戶沒有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