Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
自分の Rails サイトへのリファラー ドメインを検出したいと考えています。リファラーがドメインと一致する場合は、特定のページにリダイレクトされるようにしたいと考えています。
どうすればこれを行うことができますか?
class MyController < ApplicationController def my_action if request.referer =~ /a_domain_pattern/ redirect_to a_specific_page_path end end end