Nginx trailing slash not working
- by user1573604
I am using the below to match urls and add a trailing slash. Under location /
rewrite ^([^.]*[^/])$ $1/ permanent;
According to he logs below, it is working, however the get request is still he old url, prior to adding the slash, which results in a 404.
2013/11/08 12:33:19 [notice] 29919#0: 92 "^([^.][^/])$" matches
"/foo", client: 100.100.100.100, server: _, request: "GET /foo
HTTP/1.1", host: "100.100.100.100" 2013/11/08 12:33:19 [notice]
29919#0: *92 rewritten redirect: "/foo/", client: 100.100.100.100,
server: _, request: "GET /foo HTTP/1.1", host: "100.100.100.100"
Any suggestions as to why this might be happening?