0
AWS彈性豆莖應用(Ruby on Rails的)// WWW:重定向的https://無WWW到https:上彈性魔豆
http://www -> https://www
[作品]
http://non-www -> https://www
[作品]
https://non-www -> https://www
[行不通]
AWS彈性豆莖應用(Ruby on Rails的)// WWW:重定向的https://無WWW到https:上彈性魔豆
http://www -> https://www
[作品]
http://non-www -> https://www
[作品]
https://non-www -> https://www
[行不通]
添加,看起來像這樣的路線:
# Redirect example.com => www.example.com
constraints(host: /^example\.com/i) do
match "/(*path)" => redirect { |params, _req| "https://www.example.com/#{params[:path]}" }, via: [:get, :post]
end