Hello everyone, a have a new question :slightly_sm...
# support
s
Hello everyone, a have a new question 🙂 I would like to create a kind of permanent redirect between 'example.com' to 'shop.example.com'
Copy code
Rails.application.routes.draw do

get '/', to: 'home#index', constraints: { subdomain: '' }
mount Spree::Core::Engine, at: '/', constraints: { subdomain: 'shop' }

end
but I have an error to find the HomeController
raise MissingController.new(error.message, error.name)
PS. I just understood that it is certainly because it is in the Spree module
✅ 1
w
You can use the
redirect
helper from the routes: https://guides.rubyonrails.org/routing.html#redirection
s
Thank you it's working fine ;)