nginx remove double slash code example Example: remove trailing slash from nginx rewrite ^/(.*)/$ /$1 permanent;