# Calling same page using two url with the help of routes.rb

**URL:** <https://www.ruby-forum.com/t/calling-same-page-using-two-url-with-the-help-of-routes-rb/162173>\
**Category:** Ruby\
**Created:** [March 6, 2009, 1:37pm UTC](https://www.ruby-forum.com/t/calling-same-page-using-two-url-with-the-help-of-routes-rb/162173 "2009-03-06T13:37:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![salil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@salil](https://www.ruby-forum.com/u/salil)\
**Post date:** [March 6, 2009, 1:37pm UTC](https://www.ruby-forum.com/t/calling-same-page-using-two-url-with-the-help-of-routes-rb/162173/1 "2009-03-06T13:37:32Z")

</div>

I want to access same page using two different url’s for that i had done  
following in routes.rb  
1] map.connect ‘projects/:project\_id/issues/:action’, :controller =\>  
‘issues’  
so when my url is  
[http://localhost:3000/projects/xyz/issues/new](http://localhost:3000/projects/xyz/issues/new)

i access the new.rhtml page of a issue controller

what i want that when i write simply

[http://localhost:3000/issues/new](http://localhost:3000/issues/new) it should render me to the action new  
of a issues controller.

i try something like this in routes.rb

map.connect ‘issues/:action’, :controller =\> ‘issues’, :action=\>‘new’

and then restart the server but it doesn’t works…

---

<div class="post-metadata">

**Author:** ![salil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@salil](https://www.ruby-forum.com/u/salil)\
**Post date:** [March 6, 2009, 3:23pm UTC](https://www.ruby-forum.com/t/calling-same-page-using-two-url-with-the-help-of-routes-rb/162173/2 "2009-03-06T15:23:44Z")

</div>

On Fri, Mar 6, 2009 at 6:05 PM, Salil G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> I want to access same page using two different url’s for that i had done  
> following in routes.rb

Hello Salil. You’re unlikely to get any help on this list because its  
a plain Ruby list. Please try the rails-talk list:  
[http://www.ruby-forum.com/forum/3](http://www.ruby-forum.com/forum/3)

Cheers,  
lasitha

---

<div class="post-metadata">

**Author:** ![salil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@salil](https://www.ruby-forum.com/u/salil)\
**Post date:** [March 6, 2009, 3:38pm UTC](https://www.ruby-forum.com/t/calling-same-page-using-two-url-with-the-help-of-routes-rb/162173/3 "2009-03-06T15:38:06Z")

</div>

lasitha wrote:

> On Fri, Mar 6, 2009 at 6:05 PM, Salil G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> wrote:
> 
> > I want to access same page using two different url’s for that i had done  
> > following in routes.rb
> 
> Hello Salil. You’re unlikely to get any help on this list because its  
> a plain Ruby list. Please try the rails-talk list:  
> [http://www.ruby-forum.com/forum/3](http://www.ruby-forum.com/forum/3)
> 
> Cheers,  
> lasitha

Thanx lasitha
