Trailing Slash redirection poblem

Muhammad Yousuf Khan sirtcp at gmail.com
Sat Apr 30 07:47:20 UTC 2016


Dear All,
Need some help to remove trailing Slash.
I have been trying to remove the trailing slash with this redirection rule.
rewrite ^/(.*)/$ /$1 permanent;

however it is creating a loop.

curl -I https://xxxx.com/live/

HTTP/1.1 301 Moved Permanently
Server: nginx/1.6.2
Date: Sat, 30 Apr 2016 07:39:07 GMT
Content-Type: text/html
Content-Length: 184
Location: https://xxxx.com/live
Connection: keep-alive

curl -I https://xxxx.com/live

HTTP/1.1 301 Moved Permanently
Server: nginx/1.6.2
Date: Sat, 30 Apr 2016 07:39:29 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Location: https://xxxx.com/live/

Can you please guide what i am doing wrong here.

Thanks,
Yousuf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20160430/2c09e84c/attachment.html>


More information about the nginx mailing list