Er, the referrer should be available in
request.env[''HTTP_REFERER''].
Note, this key won''t exist unless your browser sends the Referer:
header which only shows up if you click on a link to or within your
site. You won''t see this header being sent if you type the URL of
your action directly into the address bar (as stipulated by the HTTP
spec).
On 2/22/07, Martin Honermeyer <maze at strahlungsfrei.de>
wrote:> Hello,
>
> we want to read the referer URL from the HTTP headers, in order to be able
> to track where someone is coming from, in a Rails application.
>
> As I can see in the source, Mongrel doesn''t even parse the
HTTP_REFERER
> field from HTTP requests. This would make a useful feature, I guess.
>
> Apart from that, Mongrel is (IMHO) simply the best solution for deploying
> Rails - keep on going!
>
>
> Greetings
> Martin
>
>
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users
>