How to redirect only the root path in nginx?
I found another similar solution, I think it is more concise:
location = / {
return 301 http://www.b.com/;
}
Link to source
I got it.
location ~ ^/$ {
return 301 https://www.b.com/;
}
I found another similar solution, I think it is more concise:
location = / {
return 301 http://www.b.com/;
}
Link to source
I got it.
location ~ ^/$ {
return 301 https://www.b.com/;
}