Unabe to create none www to www redirect

Hey Guys,

I am having trouble to create a none www redirect.
I tried examples which worked for others but in my case there is nothing happening.
Can anybody help me?
I am Using Kubernetes 1.13.5 with traefik:1.7.8-alpine.
The Config looks as following.

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    kubernetes.io/ingress.class: traefik
    traefik.ingress.kubernetes.io/redirect-entry-point: https
    traefik.ingress.kubernetes.io/redirect-permanent: "true"
    traefik.ingress.kubernetes.io/redirect-regex: ^https?://xn--neophytenbekmpfung-wtb.ch/?(.*)
    traefik.ingress.kubernetes.io/redirect-replacement: https://www.xn--neophytenbekmpfung-wtb.ch$${1}
    traefik.ingress.kubernetes.io/redirect-permanent: "true"
    ingress.kubernetes.io/protocol: http
    traefik.backend.loadbalancer.sticky: "true"
    traefik.ingress.kubernetes.io/affinity: "true"
    traefik.ingress.kubernetes.io/session-cookie-name: neophytenbekaempfung-sticky
    traefik.ingress.kubernetes.io/error-pages: |-
        fives:
          status:
          - "500-600"
          backend: global-default-backend
          query: "/500s.html"
        fouro3:
          status:
          - "403"
          backend: global-default-backend
          query: "/403.html"
        fours:
          status:
          - "400-499"
          backend: global-default-backend
          query: "/400s.html"
  name: neophytenbekaempfung-sitebuilder-ingress
  namespace: 	sitebuilder
spec:
  rules:
  - host: xn--neophytenbekmpfung-wtb.ch
    http:
      paths:
      - backend:
          serviceName: sitebuilder-app-service
          servicePort: 80
        path: /
  - host: www.xn--neophytenbekmpfung-wtb.ch
    http:
      paths:
      - backend:
          serviceName: sitebuilder-app-service
          servicePort: 80
        path: /    

Kind regards
Gradlon

Hello @Gradlon,

The code here:

does not allow a redirect entrypoint and a redirect regex to be used at the same time.

This was a design decision due to the complexity of merging two possible regexes.

You may have to update your redirect regex accordingly, and remove the entrypoint redirect to get it to work.

Thank you this solved my problem.
I use this as a solution for both of my needs.

    traefik.ingress.kubernetes.io/redirect-regex: ^http://.*?xn--neophytenbekmpfung-wtb.ch/|^https://xn--neophytenbekmpfung-wtb.ch/(.*)
    traefik.ingress.kubernetes.io/redirect-replacement: https://www.xn--neophytenbekmpfung-wtb.ch/$1
    traefik.ingress.kubernetes.io/redirect-permanent: "true"

Kind regards
Gradlon