Nginx重写:仅更改索引位置?
|
仅当用户没有URI时,如何才能将用户发送到新位置?我正在尝试以下操作,但是它不起作用...它总是将我发送到/ newlocation
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
谢谢!
没有找到相关结果
已邀请:
1 个回复
桔马牛