How can add trailing slash if I have two or more subdirectories ?

Edho Arief edho at myconan.net
Mon Mar 5 02:45:41 UTC 2012


2012/3/5 Valentin V. Bartenev <ne at vbart.ru>:
>>
>
>    location ~ [^/]+/[^/]+$ {
>        return 301 $uri/;
>    }
>

Or this:

location ~ ^[^.]+[^/]$ { return 301 $uri/$is_args$args; }



More information about the nginx mailing list