Created
March 27, 2014 09:37
-
-
Save ace-subido/9803796 to your computer and use it in GitHub Desktop.
Redirect to an external website when link could not be found in your Rails App
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AelogicaSite::Application.routes.draw do | |
# Insert all your base here | |
get '/404', :to => redirect { |params, request| | |
domain = 'http://yey.com' | |
"http://#{domain}/#{request.env["REQUEST_PATH"]}" | |
} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment