Referer


#1

Hello forum,

i currently try to learn ruby on rails. my first little project will be
a link blog.

i try to get the referer variable - but i don’t know to get it.

def index
@url = request.env["?"]
render :text => “The domain from which you come from is #{@url}”
end

Or do I should use the Net::HTTP?

-jens


#2

request.env[‘HTTP_REFERER’]

Mikkel

Jens K. wrote:

Hello forum,

i currently try to learn ruby on rails. my first little project will be
a link blog.

i try to get the referer variable - but i don’t know to get it.

def index
@url = request.env["?"]
render :text => “The domain from which you come from is #{@url}”
end

Or do I should use the Net::HTTP?

-jens