0

My app's primary domain is something like "mysiteiscool.com"

I have a short url, lets say "myste.com" which points to the app, and gets it own special controller for profile paths.

So in my routes.rb file, I have something like this:

constraints DomainConstraint.new('myste.com') do
   get '/:short_name', to: 'short_name#index', as: 'short_root'
end

The problem here, is every click on the rendered page after, continues to have the "myste.com" host name.

Is there a way, in the route, or controller - to set the host back to mysiteiscool.com?

Maybe before the controller renders it's found object?

Elliot
  • 13,580
  • 29
  • 82
  • 118

1 Answers1

0

This question seems to have answered it for me

How can I use Rails routes to redirect from one domain to another?

Instead of pointing to a route as I did above, I simply redirected to full path.

Community
  • 1
  • 1
Elliot
  • 13,580
  • 29
  • 82
  • 118