# Routing

**URL:** <https://www.ruby-forum.com/t/routing/121391>\
**Category:** Rails\
**Created:** [November 27, 2007, 4:04pm UTC](https://www.ruby-forum.com/t/routing/121391 "2007-11-27T16:04:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tarscher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/8491ac/32.png) [@Tarscher](https://www.ruby-forum.com/u/Tarscher)\
**Post date:** [November 27, 2007, 4:04pm UTC](https://www.ruby-forum.com/t/routing/121391/1 "2007-11-27T16:04:47Z")

</div>

Hi all,

My site uses subdomains to define an item. Eg [http://itemname.mysite.com](http://itemname.mysite.com)  
I fetch the itemname and render the appropriate site from that  
itemname. The subdomain is used everywhere (eg  
[http://itemname.mysite.com/events](http://itemname.mysite.com/events),  
[http://itemname.mysite.com/products/show/11](http://itemname.mysite.com/products/show/11), …)

I now want to give the user the possibilty to use a ‘real’ domain like  
[www.itemname.com](http://www.itemname.com) that should result in the same site as  
[http://itemname.mysite.com](http://itemname.mysite.com)  
. When the user goes to [www.itemname.com](http://www.itemname.com) I don’t want to redirect him  
to [http://itemname.mysite.com](http://itemname.mysite.com). I want to use the ‘real’ domain (eg  
[http://www.mysite.com/products/show/11](http://www.mysite.com/products/show/11) should be the same as  
[http://itemname.mysite.com/products/show/11](http://itemname.mysite.com/products/show/11)).

Is this possible?

Many thanks in advance  
Stijn

---

<div class="post-metadata">

**Author:** ![Tarscher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/8491ac/32.png) [@Tarscher](https://www.ruby-forum.com/u/Tarscher)\
**Post date:** [November 27, 2007, 4:39pm UTC](https://www.ruby-forum.com/t/routing/121391/2 "2007-11-27T16:39:58Z")

</div>

hi tarscher, i think it depends on dns routing (ie bind) not on rails.
