diff --git a/config/routes.rb b/config/routes.rb index dc32f8e..4c2a822 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -62,6 +62,8 @@ end get '/sitemap.xml' => 'sitemaps#index', defaults: { format: 'xml' } +get "/robots.:format", to: "pages#robots" + constraints(host: /^(?!www\.)/i) do match '(*any)' => redirect { |params, request| URI.parse(request.url).tap { |uri| uri.host = "www.#{uri.host}" }.to_s