我需要引用者的路径。我不想要域名。例如,如果引用者是 我要 /adsense。
/adsense
You can access referer with
request.referer
request.referer returns a string, but you can use Ruby's URI Module to wrap it and then simply ask it for its path:
if URI(request.referer).path == '/adsense'