Skip to content
This repository was archived by the owner on Jan 9, 2024. It is now read-only.

Commit bfc55c3

Browse files
authored
Merge pull request #90 from rumblex/last-chance-fix
force redirect from rubyrampage domain to battle-type domain
2 parents fb39e36 + 396b874 commit bfc55c3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

app/controllers/application_controller.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
class ApplicationController < ActionController::Base
2+
3+
#TODO: remove after juding - Force redirect from battletype.2016.rubyrampage.com TO battle-type.com
4+
before_action :redirect_to_custom_domain
5+
def redirect_to_custom_domain
6+
if request.host == 'battletype.2016.rubyrampage.com'
7+
redirect_to "https://battle-type.com#{request.fullpath}", status: 301
8+
end
9+
end
10+
211
protect_from_forgery with: :exception
312
helper_method :current_player
413
after_action :set_current_user_ip

0 commit comments

Comments
 (0)