Re: Rewrite doesn't work if location has no trailing /

2019-02-09 Thread reibuehl
I added a rewrite rule to permanently redirect /webmail to /webmail/ and it works fine! Many thanks for the quick help! Posted at Nginx Forum: https://forum.nginx.org/read.php?2,282962,282964#msg-282964 ___ nginx mailing list nginx@nginx.org http://mai

Re: Rewrite doesn't work if location has no trailing /

2019-02-09 Thread nanaya
Hi, On Sat, Feb 9, 2019, at 19:50, Reiner Bühl wrote: > Hi all, > > I currently use the following location to redirect every request for a > resource under /webmail to a seperate server: > > location /webmail { > rewrite ^/webmail(.*) /$1 break; > prox

Rewrite doesn't work if location has no trailing /

2019-02-09 Thread Reiner Bühl
Hi all, I currently use the following location to redirect every request for a resource under /webmail to a seperate server: location /webmail { rewrite ^/webmail(.*) /$1 break; proxy_pass http://127.0.0.1:8081; proxy_redirect off;