I've the following rewrite rule on location /, and it enforces trailing slash!
location / {
rewrite ^(\/.*) https://example.com/ar$1 permanent;
}
each, time I curl mydomain.com, I got the following response:
HTTP/1.1 301 Moved Permanently
Content-Type: text/html
Connection: keep-alive
Location: https://example.com/ar/
I do not want the trailing slash at the end of the redirected URL!
location / {
rewrite ^(\/.*) https://example.com/ar$1 permanent;
}
each, time I curl mydomain.com, I got the following response:
HTTP/1.1 301 Moved Permanently
Content-Type: text/html
Connection: keep-alive
Location: https://example.com/ar/
I do not want the trailing slash at the end of the redirected URL!