How do I redirect to another domain name? #5576
-
Hey there. I know I can use annotations to, say, redirect http to https. However, I need to redirect one domain to another. As it so happens I'm specifically wanting to redirect my www subdomain to my root domain, but I'm also curious how to do this more generally. Is there a way to do that without enabling snippets? For example, the k8s community nginx ingress controller has the annotation Thanks for your help! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
@kyrofa Hello there! If you are using our CRD, you can do this quite easily with if you are using Ingress resource, then yea, you would need to do use snippets or create a custom annotation. |
Beta Was this translation helpful? Give feedback.
-
That said. |
Beta Was this translation helpful? Give feedback.
@kyrofa Hello there! If you are using our CRD, you can do this quite easily with
action.redirect
:https://docs.nginx.com/nginx-ingress-controller/configuration/virtualserver-and-virtualserverroute-resources/#actionredirect
if you are using Ingress resource, then yea, you would need to do use snippets or create a custom annotation.
HTH