2017-09-07 61 views

回答

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 
相關問題