# Map.connect - redirect with 302?

**URL:** <https://www.ruby-forum.com/t/map-connect-redirect-with-302/102326>\
**Category:** Rails\
**Created:** [January 11, 2006, 9:11pm UTC](https://www.ruby-forum.com/t/map-connect-redirect-with-302/102326 "2006-01-11T21:11:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![csn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/db5fbb/32.png) [@csn](https://www.ruby-forum.com/u/csn)\
**Post date:** [January 11, 2006, 9:11pm UTC](https://www.ruby-forum.com/t/map-connect-redirect-with-302/102326/1 "2006-01-11T21:11:28Z")

</div>

Is it possible to write map.connect rules in route.rb  
that externally redirect (HTTP 302) to other actions?

thanks  
csn

* * *

Do You Yahoo!?  
Tired of spam? Yahoo! Mail has the best spam protection around

> **[Yahoo Mail - Organized Email](https://mail.yahoo.com)**
>
> It's time to get stuff done with Yahoo Mail. Just add your Gmail, Outlook, AOL or Yahoo Mail to get going. We automatically organize all the things life throws at you, like receipts and attachments, so you can find what you need fast. Plus, we've got...

---

<div class="post-metadata">

**Author:** ![csn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/db5fbb/32.png) [@csn](https://www.ruby-forum.com/u/csn)\
**Post date:** [January 11, 2006, 10:03pm UTC](https://www.ruby-forum.com/t/map-connect-redirect-with-302/102326/2 "2006-01-11T22:03:29Z")

</div>

Yep, I thought of that ;). I was just curious if  
something like this was possible:

map.connect ‘/a/:b’, redirect\_to :controller=\>‘c’,  
:action=\>‘d’

csn

— Nick S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > * * *
> 
> * * *
> 
> Rails mailing list  
> removed\_email\_address@domain.invalid  
> [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

* * *

Do You Yahoo!?  
Tired of spam? Yahoo! Mail has the best spam protection around

> **[\[object](https://mail.yahoo.com/)**
>
> \[object

---

<div class="post-metadata">

**Author:** ![csn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/db5fbb/32.png) [@csn](https://www.ruby-forum.com/u/csn)\
**Post date:** [January 11, 2006, 9:44pm UTC](https://www.ruby-forum.com/t/map-connect-redirect-with-302/102326/3 "2006-01-11T21:44:49Z")

</div>

Well you could have action that does it for you. Just map what you  
want the action and have that do the redirect. Would that cover what  
you need? The user would still see the same effect as they don’t see  
anything happening with the mapping rules themselves.

-Nick
