Skip to content

Commit c5b6d0d

Browse files
[Website] Remove trailing slashes (#9863)
1 parent bc7fa85 commit c5b6d0d

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

website-next/nginx/conf.d/redirects.conf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88
# * use `rewrite ... redirect` for 302 redirects
99
# * group related rules with a short comment
1010

11+
# Always strip trailing slashes. The static export uses non-slash URLs
12+
# (`trailingSlash: false`), so any path with a trailing slash 404s. Running
13+
# this first canonicalizes the path so every later rule and the file lookup
14+
# operate on the slash-free form (the root `/` is left untouched).
15+
rewrite ^/(.+)/$ /$1 permanent;
16+
1117
# temporary redirects
1218
rewrite ^/platform/bananacakepop/?$ /products/nitro redirect;
1319
rewrite ^/products/hotchocolate/?$ /docs/hotchocolate redirect;

0 commit comments

Comments
 (0)