I have the following rewrite rule in my nginx:
rewrite ^/(.*)/$ /$1 permanent;
to remove trailing slash at the end of any URL. However I wanted to make an exception such that when the URL is /register/
I don't want this rule to be applied. How do I put that into the regex?