-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean up redirects a little bit #753
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,10 +44,10 @@ http { | |
rewrite ^/(.*)//+(.*) $scheme://$http_host/$1/$2 permanent; # remove adjacent slashes in the middle of the URI | ||
rewrite ^/([^.]*[^/])$ $scheme://$http_host/$1/ permanent; # force a trailing slash except for files with an extension | ||
|
||
# Permanent redirects (301) | ||
rewrite ^/docs/hostedservice/(.*)$ $scheme://$http_host/docs/en/hosted-service/$1 permanent; | ||
rewrite ^/docs/(?!(?:[a-zA-Z][a-zA-Z]|_next|img)(?:/|$))(.*)$ $scheme://$http_host/docs/en/$1 permanent; # Redirect to `/en` if no language in URL and not an asset URL | ||
# Redirect to `/en` if no language in URL and not an asset URL | ||
rewrite ^/docs/(?!(?:[a-zA-Z][a-zA-Z]|_next|img)(?:/|$))(.*)$ $scheme://$http_host/docs/en/$1 permanent; | ||
|
||
# Permanent redirects (301) | ||
rewrite ^/docs/([a-zA-Z][a-zA-Z])/about/introduction/$ $scheme://$http_host/docs/$1/about/ permanent; | ||
rewrite ^/docs/([a-zA-Z][a-zA-Z])/about/network/$ $scheme://$http_host/docs/$1/network/overview/ permanent; | ||
rewrite ^/docs/([a-zA-Z][a-zA-Z])/curating/$ $scheme://$http_host/docs/$1/network/curating/ permanent; | ||
|
@@ -88,14 +88,16 @@ http { | |
rewrite ^/docs/([a-zA-Z][a-zA-Z])/arbitrum-faq/$ $scheme://$http_host/docs/$1/arbitrum/arbitrum-faq/ permanent; | ||
rewrite ^/docs/([a-zA-Z][a-zA-Z])/cookbook/migrating-a-subgraph/$ $scheme://$http_host/docs/$1/cookbook/upgrading-a-subgraph/ permanent; | ||
rewrite ^/docs/([a-zA-Z][a-zA-Z])/cookbook/quick-start/$ $scheme://$http_host/docs/$1/quick-start/ permanent; | ||
rewrite ^/docs/en/substreams/(?!index\.).+$ https://substreams.streamingfast.io permanent; | ||
rewrite ^/docs/en/firehose/(?!index\.).+$ https://firehose.streamingfast.io permanent; | ||
Comment on lines
-91
to
-92
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just moved these to the bottom of the list because they're different from the others (English-only). |
||
rewrite ^/docs/([a-zA-Z][a-zA-Z])/developer/assemblyscript-api/$ $scheme://$http_host/docs/$1/developing/graph-ts/api/ permanent; | ||
rewrite ^/docs/([a-zA-Z][a-zA-Z])/developing/assemblyscript-api/$ $scheme://$http_host/docs/$1/developing/graph-ts/api/ permanent; | ||
rewrite ^/docs/([a-zA-Z][a-zA-Z])/managing/deprecating-a-subgraph/$ $scheme://$http_host/docs/$1/managing/transfer-and-deprecate-a-subgraph/ permanent; | ||
rewrite ^/docs/([a-zA-Z][a-zA-Z])/managing/transferring-subgraph-ownership/$ $scheme://$http_host/docs/$1/managing/transfer-and-deprecate-a-subgraph/ permanent; | ||
Comment on lines
+93
to
+94
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These are the redirects that should have been included in #741; my bad for not noticing in my review. :) |
||
rewrite ^/docs/en/substreams/(?!index\.).+$ https://substreams.streamingfast.io permanent; | ||
rewrite ^/docs/en/firehose/(?!index\.).+$ https://firehose.streamingfast.io permanent; | ||
|
||
# Temporary redirects (302) | ||
rewrite ^/docs/en/querying/graph-client/$ $scheme://$http_host/docs/en/querying/graph-client/README/ redirect; | ||
rewrite ^/docs/en/developing/graph-ts/$ $scheme://$http_host/docs/en/developing/graph-ts/README/ redirect; | ||
rewrite ^/docs/en/querying/graph-client/$ $scheme://$http_host/docs/en/querying/graph-client/README/ redirect; | ||
rewrite ^/docs/en/developing/graph-ts/$ $scheme://$http_host/docs/en/developing/graph-ts/README/ redirect; | ||
|
||
location / { | ||
try_files $uri $uri.html $uri/index.html =404; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,31 +56,7 @@ export default withNextra({ | |
destination: '/en/', | ||
permanent: true, | ||
}, | ||
{ | ||
source: '/en/arbitrum-faq/', | ||
destination: '/en/arbitrum/arbitrum-faq/', | ||
permanent: true, | ||
}, | ||
{ | ||
source: '/en/querying/graph-client/', | ||
destination: '/en/querying/graph-client/README/', | ||
permanent: false, | ||
}, | ||
{ | ||
source: '/en/developing/graph-ts/', | ||
destination: '/en/developing/graph-ts/README/', | ||
permanent: false, | ||
}, | ||
{ | ||
source: '/en/developer/assemblyscript-api/', | ||
destination: '/en/developing/graph-ts/api/', | ||
permanent: true, | ||
}, | ||
{ | ||
source: '/en/developing/assemblyscript-api/', | ||
destination: '/en/developing/graph-ts/api/', | ||
permanent: true, | ||
}, | ||
Comment on lines
-59
to
-83
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The only reason we ever needed to include redirects here (in addition to |
||
// If we ever change `output` to not be `export`, we should move all the redirects from `nginx.conf` here | ||
], | ||
images: { | ||
unoptimized: true, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those
/docs/hostedservice/*
URLs must be really old; I couldn't find any reference to them anywhere. Also, we deprecated the HS, so I think it's safe to remove this rule.