Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

why that rewrite rule enforces trailing slash

$
0
0
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!

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>