Skip to content

Commit

Permalink
Docs: Fix from-to-www redirect description. (#11715)
Browse files Browse the repository at this point in the history
Co-authored-by: dvg <vdruginin@gmail.com>
  • Loading branch information
k8s-infra-cherrypick-robot and dvglab authored Aug 1, 2024
1 parent 0500913 commit 2d6c330
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/user-guide/nginx-configuration/annotations.md
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ To preserve the trailing slash in the URI with `ssl-redirect`, set `nginx.ingres

In some scenarios, it is required to redirect from `www.domain.com` to `domain.com` or vice versa, which way the redirect is performed depends on the configured `host` value in the Ingress object.

For example, if `.spec.rules.host` is configured with a value like `www.example.com`, then this annotation will redirect to `example.com`. If `.spec.rules.host` is configured with a value like `example.com`, so without a `www`, then this annotation will redirect to `www.example.com` instead.
For example, if `.spec.rules.host` is configured with a value like `www.example.com`, then this annotation will redirect from `example.com` to `www.example.com`. If `.spec.rules.host` is configured with a value like `example.com`, so without a `www`, then this annotation will redirect from `www.example.com` to `example.com` instead.

To enable this feature use the annotation `nginx.ingress.kubernetes.io/from-to-www-redirect: "true"`
Expand Down

0 comments on commit 2d6c330

Please sign in to comment.