## Include these directives inside the public HTTPS server block, before the ## generic static `location /` handler. Root (`/`) is the only trailing-slash ## public URL; every other terminal slash receives a query-preserving 308. location ~ ^(.+?)/+$ { return 308 $1$is_args$args; } ## The static handler must serve the generated directory artifact at its ## slashless public path. Do not use `$uri/`, which permits nginx's automatic ## directory-slash redirect before `$uri/index.html` can be served. location / { try_files $uri $uri/index.html $uri.html =404; } rewrite ^/aba$ /aba-therapy permanent; rewrite ^/autismevaluations$ /autism-evaluations permanent; rewrite ^/learnersocialclub$ /learner-social-club permanent; rewrite ^/library/page/1$ /library permanent; rewrite ^/es/library/page/1$ /es/library permanent; rewrite ^/ar/library/page/1$ /ar/library permanent; rewrite ^/library/author/rula-diab/page/1$ /library/author/rula-diab permanent; rewrite ^/es/library/author/rula-diab/page/1$ /es/library/author/rula-diab permanent; rewrite ^/ar/library/author/rula-diab/page/1$ /ar/library/author/rula-diab permanent;