forked from Materials-Consortia/providers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_redirects
20 lines (17 loc) · 1.08 KB
/
_redirects
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# The exclamation mark at the end of the HTTP code is to make sure
# the redirect is always followed even if there is a file at that page.
# See https://docs.netlify.com/routing/redirects/rewrites-proxies/#shadowing
# Returning 200 just returns the content without doing a HTTP redirect, i.e.
# without changing the URL, that is what we want to achieve here
# https://docs.netlify.com/routing/redirects/redirect-options/#http-status-codes
/versions /src/versions.csv 200!
/providers.json /src/links/v1/providers.json 200!
/v1/links /src/links/v1/providers.json 200!
/v1/info /src/info/v1/info.json 200!
# Provide redirects for index meta-databases (removing the JSON at the end)
/index-metadbs/:providerid/versions /src/versions.csv 200!
/index-metadbs/:providerid/:version/links /src/index-metadbs/:providerid/:version/links.json 200!
/index-metadbs/:providerid/:version/info /src/index-metadbs/:providerid/:version/info.json 200!
# Redirect bare/versioned base URLs to a helpful landing page
/index-metadbs/:providerid /src/landing_page.html 200!
/index-metadbs/:providerid/v1/ /src/landing_page.html 200!