@post = Post.find(params[:id])
link_to "Title", post_path(@post)
link_to "Title", @post
Rails.application.routes.draw do
constraints subdomain: /.+/ do
get '/(*uri)' => redirect { |params, request| "http://example.com#{request.original_fullpath}" }
end
root 'welcome#index'
end