[英]ingress-nginx permanent redirect 301 not working
更新:這個問題解決了。 我不知道為什么。 我第二天再次嘗試,它使用下面的配置。
我正在使用“ingress-nginx”入口控制器(v.0.12.0)。 除永久重定向外,它工作正常。
為了將foo.example.com
重定向到https://google.com
我應用了以下入口配置:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
# nginx.ingress.kubernetes.io/ssl-redirect: "false"
nginx.ingress.kubernetes.io/permanent-redirect: "https://google.com"
name: redirect-test
namespace: default
spec:
rules:
- host: foo.example.com
http:
paths:
- backend:
serviceName: default-backend
servicePort: 80
tls:
- hosts:
- foo.example.com
secretName: domains-tls
但如果我在瀏覽器中輸入foo.example.com
,我會得到:
很抱歉,我們無法處理您嘗試訪問的網站的重定向請求。
如果您認為錯誤地收到了此郵件,請檢查該網址並再次嘗試使用您的請求。
UT
(RF)
有誰知道這里出了什么問題?
我有同樣的問題,
我通過將nginx-ingress圖表從nginx-ingress-0.8.13
到nginx-ingress-0.22.0
我假設永久重定向注釋nginx.ingress.kubernetes.io/permanent-redirect
在0.8.13
不存在。
因此,掌舵升級您的圖表或直接升級您的nginx-ingress。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.