Skip to content

Commit 5f64fcf

Browse files
committed
Support redirects in development and previews
1 parent 9aae986 commit 5f64fcf

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

netlify.toml

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,26 @@
1111

1212
# Shortcut to discord server invite
1313
[[redirects]]
14-
from = "https://testing-library.com/discord"
14+
from = "/discord"
1515
to = "https://discord.gg/c6JN9fM"
1616
force = true
1717

1818
# React root to React landing page
1919
[[redirects]]
2020
from = "https://react-testing-library.com/"
21-
to = "https://testing-library.com/react/"
21+
to = "/react/"
2222
force = true
2323

2424
# React to main domain
2525
[[redirects]]
2626
from = "https://react-testing-library.com/*"
27-
to = "https://testing-library.com/:splat"
27+
to = "/:splat"
2828
force = true
2929

3030
# Netlify subdomain to main domain
3131
[[redirects]]
3232
from = "https://testing-library.netlify.com/*"
33-
to = "https://testing-library.com/:splat"
33+
to = "/:splat"
3434
force = true
3535

3636
# Redirects due to reorganization (do not redirect if route is not 404)
@@ -46,78 +46,78 @@
4646

4747
# DOM landing page to home page
4848
[[redirects]]
49-
from = "https://testing-library.com/dom/"
50-
to = "https://testing-library.com/docs/dom-testing-library/intro"
49+
from = "/dom/"
50+
to = "/docs/dom-testing-library/intro"
5151
force = true
5252

5353
# React landing page to home page
5454
[[redirects]]
55-
from = "https://testing-library.com/react/"
56-
to = "https://testing-library.com/docs/react-testing-library/intro"
55+
from = "/react/"
56+
to = "/docs/react-testing-library/intro"
5757
force = true
5858

5959
# React Native landing page to home page
6060
[[redirects]]
61-
from = "https://testing-library.com/react-native/"
62-
to = "https://testing-library.com/docs/react-native-testing-library/intro"
61+
from = "/react-native/"
62+
to = "/docs/react-native-testing-library/intro"
6363
force = true
6464

6565
# Cypress landing page to home page
6666
[[redirects]]
67-
from = "https://testing-library.com/cypress/"
68-
to = "https://testing-library.com/docs/cypress-testing-library/intro"
67+
from = "/cypress/"
68+
to = "/docs/cypress-testing-library/intro"
6969
force = true
7070

7171
# Vue landing page to home page
7272
[[redirects]]
73-
from = "https://testing-library.com/vue/"
74-
to = "https://testing-library.com/docs/vue-testing-library/intro"
73+
from = "/vue/"
74+
to = "/docs/vue-testing-library/intro"
7575
force = true
7676

7777
# Angular landing page to home page
7878
[[redirects]]
79-
from = "https://testing-library.com/angular/"
80-
to = "https://testing-library.com/docs/angular-testing-library/intro"
79+
from = "/angular/"
80+
to = "/docs/angular-testing-library/intro"
8181
force = true
8282

8383
# Puppeteer landing page to home page
8484
[[redirects]]
85-
from = "https://testing-library.com/pptr/"
86-
to = "https://testing-library.com/docs/pptr-testing-library/intro"
85+
from = "/pptr/"
86+
to = "/docs/pptr-testing-library/intro"
8787
force = true
8888

8989
# Svelte landing page to home page
9090
[[redirects]]
91-
from = "https://testing-library.com/svelte/"
92-
to = "https://testing-library.com/docs/svelte-testing-library/intro"
91+
from = "/svelte/"
92+
to = "/docs/svelte-testing-library/intro"
9393
force = true
9494

9595
# Preact landing page to home page
9696
[[redirects]]
97-
from = "https://testing-library.com/preact/"
98-
to = "https://testing-library.com/docs/preact-testing-library/intro"
97+
from = "/preact/"
98+
to = "/docs/preact-testing-library/intro"
9999
force = true
100100

101101
# jest-dom landing page to home page
102102
[[redirects]]
103-
from = "https://testing-library.com/jest-dom/"
104-
to = "https://testing-library.com/docs/ecosystem-jest-dom"
103+
from = "/jest-dom/"
104+
to = "/docs/ecosystem-jest-dom"
105105
force = true
106106

107107
# Testcafe landing page to home page
108108
[[redirects]]
109-
from = "https://testing-library.com/testcafe/"
110-
to = "https://testing-library.com/docs/testcafe-testing-library/intro"
109+
from = "/testcafe/"
110+
to = "/docs/testcafe-testing-library/intro"
111111
force = true
112112

113113
# Nightwatch landing page to home page
114114
[[redirects]]
115-
from = "https://testing-library.com/nightwatch/"
116-
to = "https://testing-library.com/docs/nightwatch-testing-library/intro"
115+
from = "/nightwatch/"
116+
to = "/docs/nightwatch-testing-library/intro"
117117
force = true
118118

119119
# React Redux recipe to Redux's recipe
120120
[[redirects]]
121-
from = "https://testing-library.com/docs/example-react-redux"
121+
from = "/docs/example-react-redux"
122122
to = "https://redux.js.org/recipes/writing-tests#connected-components"
123123
force = true

0 commit comments

Comments
 (0)