-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnetlify.toml
53 lines (47 loc) · 1.39 KB
/
netlify.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# The order of this rule is important. If it is placed after the catch-all rule for blog posts, it will
# redirect the feed to https://swiftpackageindex.com/blog/feed.rss, which is close, but subtly different
# from https://swiftpackageindex.com/blog/feed.xml, which is the correct URL.
[[redirects]]
from = "/posts/feed.rss"
to = "https://swiftpackageindex.com/blog/feed.xml"
headers = { X-From = "Netlify" }
status = 301
force = true
[[redirects]]
from = "/feed.rss"
to = "https://swiftpackageindex.com/blog/feed.xml"
headers = { X-From = "Netlify" }
status = 301
force = true
# Redirect the root of the domain, and the /posts/ directory to the new blog.
[[redirects]]
from = "/"
to = "https://swiftpackageindex.com/blog"
headers = { X-From = "Netlify" }
status = 301
force = true
[[redirects]]
from = "/posts"
to = "https://swiftpackageindex.com/blog"
headers = { X-From = "Netlify" }
status = 301
force = true
[[redirects]]
from = "/posts/"
to = "https://swiftpackageindex.com/blog"
headers = { X-From = "Netlify" }
status = 301
force = true
# Redirect the old blog post URLs to the new blog post URLs.
[[redirects]]
from = "/posts/:post_name"
to = "https://swiftpackageindex.com/blog/:post_name"
headers = { X-From = "Netlify" }
status = 301
force = true
[[redirects]]
from = "/posts/:post_name/"
to = "https://swiftpackageindex.com/blog/:post_name"
headers = { X-From = "Netlify" }
status = 301
force = true