0

I added refile for file uploading in my rails 4.2 app. But now I starting to see Sinatra::NotFound when a user mistypes an url. What can I do to prevent it so it displays the correct error page?

user3384741
  • 1,261
  • 3
  • 16
  • 21

1 Answers1

0

I think what you're looking for is a 'catch all' route. Basically, if the url is mistyped your application will reroute to a default route:

get '/*' do
  redirect "http://whateverYouWant.com"
end