2017-09-07 3 views

Répondre

0

Ajouter un itinéraire qui ressemble à ceci:

# 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