發現網站如果沒有打www.winsomeyang.com
,只打winsomeyang.com
就會顯示"你的連線不是私人連線"
查了一下,可以寫個netlify.toml
做redirects
我是照著這篇的寫法來寫的
[[redirects]]
from = "https://example.netlify.com/*"
to = "https://www.example.com/:splat"
status = 301
force = true
[[redirects]]
from = "http://example.netlify.com/*"
to = "http://www.example.com/:splat"
status = 301
force = true
[[redirects]]
from = "http://www.example.com/*"
to = "https://www.example.com/:splat"
status = 301
force = true