Skip to content

Commit

Permalink
Fix redirects
Browse files Browse the repository at this point in the history
When we introduced netlify.toml, netlify stopped reading from
_redirects.  This restores that functionality.
  • Loading branch information
DirectXMan12 committed May 15, 2019
1 parent 6f7c8c3 commit aa8dcfd
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 14 deletions.
14 changes: 0 additions & 14 deletions docs/book/_redirects

This file was deleted.

52 changes: 52 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,55 @@
base = "docs/book"
command = "./install-and-build.sh"
publish = "docs/book/book"


# Standard Netlify redirects
[[redirects]]
from = "https://kubebuilder.netlify.com/*"
to = "https://book.kubebuilder.io/:splat"
status = 301
force = true

# HTTP-to-HTTPS rules
[[redirects]]
from = "http://go.kubebuilder.io/*"
to = "https://go.kubebuilder.io/:splat"
status = 301
force = true

[[redirects]]
from = "http://kubebuilder.netlify.com/*"
to = "http://book.kubebuilder.io/:splat"
status = 301
force = true

# Go Links
[[redirects]]
from = "https://go.kubebuilder.io/dl/*"
to = "https://go.kubebuilder.io/releases/:splat"
status = 301
force = true

[[redirects]]
from = "https://go.kubebuilder.io/releases"
to = "https://github.com/kubernetes-sigs/kubebuilder/releases"
status = 302
force = true

[[redirects]]
from = "https://go.kubebuilder.io/releases/:version"
to = "https://github.com/kubernetes-sigs/kubebuilder/releases/v:version"
status = 302
force = true

[[redirects]]
from = "https://go.kubebuilder.io/releases/:version/:os"
to = "https://go.kubebuilder.io/releases/:version/:os/amd64"
status = 302
force = true

[[redirects]]
from = "https://go.kubebuilder.io/releases/:version/:os/:arch"
to = "https://github.com/kubernetes-sigs/kubebuilder/releases/download/v:version/kubebuilder_:version_:os_:arch.tar.gz"
status = 302
force = true

0 comments on commit aa8dcfd

Please sign in to comment.