AWS Elastic Beanstalk应用程序(Ruby on Rails):
http://www -> https://www
[作品]
http://non-www -> https://www
[作品]
https://non-www -> https://www
[无效]
答案 0 :(得分:0)
添加如下所示的路线:
# 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