# Route map with custom url

**URL:** <https://www.ruby-forum.com/t/route-map-with-custom-url/174726>\
**Category:** Rails\
**Created:** [September 1, 2009, 10:49am UTC](https://www.ruby-forum.com/t/route-map-with-custom-url/174726 "2009-09-01T10:49:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aldoitalo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a587f6/32.png) [@aldoitalo](https://www.ruby-forum.com/u/aldoitalo)\
**Post date:** [September 1, 2009, 10:49am UTC](https://www.ruby-forum.com/t/route-map-with-custom-url/174726/1 "2009-09-01T10:49:54Z")

</div>

hi, i have setting this rule on my route.rb:

map.typo ‘/my\_custom\_name1/:id/my\_custom\_name2/:alpha’, :namespace =\>  
‘front’, :controller =\> ‘locations’, :action =\> ‘typo\_locations’, :alpha  
=\> { :alpha =\> :get }

in the view for create link :

link\_to( letter, typo\_path( obj.id, :alpha =\> letter ) )

it works, but in my browser i display this URL:

[http://localhost:3000/my\_custom\_name1/10?alpha=A](http://localhost:3000/my_custom_name1/10?alpha=A)

instead i want to display this:

[http://localhost:3000/my\_custom\_name1/10/my\_custom\_name2/A](http://localhost:3000/my_custom_name1/10/my_custom_name2/A)

how can obtain the result?

---

<div class="post-metadata">

**Author:** ![aldoitalo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a587f6/32.png) [@aldoitalo](https://www.ruby-forum.com/u/aldoitalo)\
**Post date:** [September 1, 2009, 11:33am UTC](https://www.ruby-forum.com/t/route-map-with-custom-url/174726/2 "2009-09-01T11:33:37Z")

</div>

> map.typo ‘/my\_custom\_name1/:id/my\_custom\_name2/:alpha’, :namespace =\>  
> ‘front’, :controller =\> ‘locations’, :action =\> ‘typo\_locations’, :alpha  
> =\> { :alpha =\> :get }

i solved with here:

map.typo\_alpha\_path ‘/my\_custom\_name1/:id/my\_custom\_name2/:alpha’,  
:namespace =\>

> ‘front’, :controller =\> ‘locations’, :action =\> ‘typo\_locations’, :alpha  
> =\> { :alpha =\> :get }
