I need the path of the referrer. I don't want the domain name. For example, if the referrer is
http://www.google.com/adsense
I want /adsense
.
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'
You can access referer with
request.referer
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With