# I had a very basic question as to, how does rails encodes UR

**URL:** <https://www.ruby-forum.com/t/i-had-a-very-basic-question-as-to-how-does-rails-encodes-ur/113802>\
**Category:** Rails\
**Created:** [September 5, 2007, 6:45am UTC](https://www.ruby-forum.com/t/i-had-a-very-basic-question-as-to-how-does-rails-encodes-ur/113802 "2007-09-05T06:45:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jhonny](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/919ad9/32.png) [@jhonny](https://www.ruby-forum.com/u/jhonny)\
**Post date:** [September 5, 2007, 6:45am UTC](https://www.ruby-forum.com/t/i-had-a-very-basic-question-as-to-how-does-rails-encodes-ur/113802/1 "2007-09-05T06:45:19Z")

</div>

Hi,

I had a very basic question as to, how does rails encodes URl’s ?

Eg.

1\> [http://my.shop.com/store/show\_product/123](http://my.shop.com/store/show_product/123)

and in

2\> [http://my.blog.com/blog/2005/07/04](http://my.blog.com/blog/2005/07/04)

Regards,

Piyush G.

99161-33729

> **[Three finger salute](http://ctrlshiftesc.blogspot.com/)**
>
> I think, therefore I Am...said Descartes! 
> 
> I Am, therefore I will think...said Ayn Rand! 
> 
> I think I Am, therefore I think I am thinking...says The Common Man!!!

---

<div class="post-metadata">

**Author:** ![jhonny](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/919ad9/32.png) [@jhonny](https://www.ruby-forum.com/u/jhonny)\
**Post date:** [September 5, 2007, 10:57am UTC](https://www.ruby-forum.com/t/i-had-a-very-basic-question-as-to-how-does-rails-encodes-ur/113802/2 "2007-09-05T10:57:42Z")

</div>

Piyush G. wrote:

> Hi,
> 
> I had a very basic question as to, how does rails encodes URl’s ?
> 
> Eg.
> 
> 1\> [http://my.shop.com/store/show\_product/123](http://my.shop.com/store/show_product/123)
> 
> and in
> 
> 2\> [http://my.blog.com/blog/2005/07/04](http://my.blog.com/blog/2005/07/04)
> 
> Regards,
> 
> Piyush G.
> 
> 99161-33729
> 
> [http://ctrlshiftesc.blogspot.com/](http://ctrlshiftesc.blogspot.com/)

You basically use config/route.rb 🙂

blog/:year/:month/day

something like that, and then you can put the requirements if you want  
so…
