# Page redirect

**URL:** <https://www.ruby-forum.com/t/page-redirect/87968>\
**Category:** Rails\
**Created:** [March 7, 2007, 8:24am UTC](https://www.ruby-forum.com/t/page-redirect/87968 "2007-03-07T08:24:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![john\_old](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9f8e36/32.png) [@john\_old](https://www.ruby-forum.com/u/john_old)\
**Post date:** [March 7, 2007, 8:24am UTC](https://www.ruby-forum.com/t/page-redirect/87968/1 "2007-03-07T08:24:37Z")

</div>

i have a small query for all of you

i have a report problem link in a view and after reporting the problem  
sucessfully

the page should redirect to the previous page prior to clicking the  
report problem link

---

<div class="post-metadata">

**Author:** ![john\_old](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9f8e36/32.png) [@john\_old](https://www.ruby-forum.com/u/john_old)\
**Post date:** [March 7, 2007, 2:09pm UTC](https://www.ruby-forum.com/t/page-redirect/87968/2 "2007-03-07T14:09:28Z")

</div>

Hi John,

john wrote:

> the page should redirect to the previous page prior  
> to clicking the report problem link

redirect\_to =\> :back

hth,  
Bill

---

<div class="post-metadata">

**Author:** ![john\_old](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9f8e36/32.png) [@john\_old](https://www.ruby-forum.com/u/john_old)\
**Post date:** [March 10, 2007, 7:10am UTC](https://www.ruby-forum.com/t/page-redirect/87968/3 "2007-03-10T07:10:02Z")

</div>

On Mar 7, 2007, at 10:24, john wrote:

> i have a small query for all of you
> 
> i have a report problem link in a view and after reporting the problem  
> sucessfully
> 
> the page should redirect to the previous page prior to clicking the  
> report problem link

Try redirect\_to :back or using request.env[“HTTP\_REFERER”] as the link  
address.
