Welcome! Log In Create A New Profile

Advanced

Trailing Slash redirection poblem

Muhammad Yousuf Khan
April 30, 2016 03:48AM
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
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Trailing Slash redirection poblem

Muhammad Yousuf Khan April 30, 2016 03:48AM

Re: Trailing Slash redirection poblem

Francis Daly April 30, 2016 04:42AM

Re: Trailing Slash redirection poblem

Muhammad Yousuf Khan May 01, 2016 04:18AM

Re: Trailing Slash redirection poblem

Muhammad Yousuf Khan May 01, 2016 04:20AM

Re: Trailing Slash redirection poblem

B.R. May 01, 2016 10:46AM

Re: Trailing Slash redirection poblem

Francis Daly May 02, 2016 05:20AM

Re: Trailing Slash redirection poblem

Muhammad Yousuf Khan May 02, 2016 08:50AM

Re: Trailing Slash redirection poblem

Francis Daly May 03, 2016 03:24PM

Re: Trailing Slash redirection poblem

Muhammad Yousuf Khan May 04, 2016 08:54AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 60
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready