# How to get referral (inner) link

**URL:** <https://www.ruby-forum.com/t/how-to-get-referral-inner-link/188333>\
**Category:** Rails\
**Created:** [May 10, 2010, 11:43am UTC](https://www.ruby-forum.com/t/how-to-get-referral-inner-link/188333 "2010-05-10T11:43:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![adedip](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e495f1/32.png) [@adedip](https://www.ruby-forum.com/u/adedip)\
**Post date:** [May 10, 2010, 11:43am UTC](https://www.ruby-forum.com/t/how-to-get-referral-inner-link/188333/1 "2010-05-10T11:43:27Z")

</div>

Hi there, here’s my problem.  
I have the whole site pages that might point in anymoment to a map  
page where customer choose the country he belongs to.  
I need to save the url they where before to enter into the map page.  
something link “request.request\_uri” but that works for the previous  
page…  
I thought I’d need something that acts like history.back(); with  
javascript but I need to store that param in session…

how can I do that?!  
thanks 😉  
Andrea
