Answer the question
In order to leave comments, you need to log in
Elasticsearch in RoR. Get rid of the 3rd level domain. How to correctly specify paths in routes?
In general, everything is fine for the 2nd level domain. - example.com/search?utf8=✓&query=example1
The 3rd level domain requires that the query redirect to the 2nd level domain and not stay on the 3rd level domain. - foo.example.com/search?utf8=✓&query=example2
And more, how and is it worth getting rid of the parameter in the utf8=✓ request? Because I know that it is kind of like for IE old versions.
using kaminari
Answer the question
In order to leave comments, you need to log in
For all subdomains
Rails.application.routes.draw do
constraints subdomain: /.+/ do
get '/(*uri)' => redirect { |params, request| "http://example.com#{request.original_fullpath}" }
end
root 'welcome#index'
end
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question