Skip to content

Commit

Permalink
Add 302 redirect from /en/firehose/ to /en/firehose/README/ (#414)
Browse files Browse the repository at this point in the history
  • Loading branch information
benface authored Jun 13, 2023
1 parent 8170945 commit 989664e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 4 additions & 1 deletion nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ http {
# 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
rewrite ^/docs/en/substreams/$ $scheme://$http_host/docs/en/substreams/README/ permanent;

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;
Expand Down Expand Up @@ -86,6 +85,10 @@ http {
rewrite ^/docs/([a-zA-Z][a-zA-Z])/supported-networks/near/$ $scheme://$http_host/docs/$1/cookbook/near/ permanent;
rewrite ^/docs/([a-zA-Z][a-zA-Z])/developing/defining-a-subgraph/$ $scheme://$http_host/docs/$1/developing/creating-a-subgraph/ permanent;

# Temporary redirects (302)
rewrite ^/docs/en/substreams/$ $scheme://$http_host/docs/en/substreams/README/ redirect;
rewrite ^/docs/en/firehose/$ $scheme://$http_host/docs/en/firehose/README/ redirect;

location / {
try_files $uri $uri.html $uri/index.html =404;

Expand Down
5 changes: 5 additions & 0 deletions website/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ export default withNextra({
destination: '/en/substreams/README/',
permanent: false,
},
{
source: '/en/firehose/',
destination: '/en/firehose/README/',
permanent: false,
},
],
webpack(config) {
config.module.rules.push({
Expand Down

0 comments on commit 989664e

Please sign in to comment.