diff --git a/manifests/artemis/digital-garden/www-redirect.yaml b/manifests/artemis/digital-garden/www-redirect.yaml index 5e68439..c6989a1 100644 --- a/manifests/artemis/digital-garden/www-redirect.yaml +++ b/manifests/artemis/digital-garden/www-redirect.yaml @@ -8,12 +8,19 @@ spec: - websecure routes: - kind: Rule - match: Host(`groothuis.io`) || Host(`danielgroothuis.com`) || Host(`www.danielgroothuis.com`) + match: Host(`groothuis.io`) middlewares: - name: redirect-to-www services: - kind: TraefikService name: noop@internal + - kind: Rule + match: Host(`danielgroothuis.com`) || Host(`www.danielgroothuis.com`) + middlewares: + - name: redirect-to-groothuis-io + services: + - kind: TraefikService + name: noop@internal --- apiVersion: traefik.io/v1alpha1 kind: Middleware @@ -24,3 +31,13 @@ spec: permanent: true regex: "^https?://(?:www\\.)?(.+)" replacement: "https://www.${1}" +--- +apiVersion: traefik.io/v1alpha1 +kind: Middleware +metadata: + name: redirect-to-groothuis-io +spec: + redirectRegex: + permanent: true + regex: "^https?://(?:www\\.)?(.+)" + replacement: "https://www.groothuis.io"