I'm using nginx for the first time and I can't seem to figure this out. I'm trying to rewrite my nginx config so that all of my URLs no longer have the trailing slash that nginx defaults to.
I've been trying the following, but it still results in a redirect loop ("Firefox has detected that the server is redirecting the request for this address in a way that will never complete."):
server_name_in_redirect off;
rewrite ^/(.*)/$ /$1 permanent;
Any ideas on what might be going wrong here and how I can remove trailing slashes?