# Controller as subdomain

**URL:** <https://www.ruby-forum.com/t/controller-as-subdomain/92379>\
**Category:** Rails\
**Created:** [April 18, 2007, 9:27pm UTC](https://www.ruby-forum.com/t/controller-as-subdomain/92379 "2007-04-18T21:27:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [April 18, 2007, 9:27pm UTC](https://www.ruby-forum.com/t/controller-as-subdomain/92379/1 "2007-04-18T21:27:54Z")

</div>

Hello,

How can I make a controller like a subdomain?

Something like:

from :  
localhost/controller/action

to:  
controller.localhost/action

Example:  
[www.mysite.com/about](http://www.mysite.com/about)  
[www.mysite.com/contact](http://www.mysite.com/contact)

> **[Page Not Found- Low-cost email address - 1GB email storage - Block spam - Web...](http://account.mysite.com/register)**
>
> emailMyName personal email from mySite.com. Half the standard price of Yahoo! and Hotmail. With emailyMyName you get your name as your personal email address. emailMyName includes virtually unlimited storage - 1GB of storage (1024 MB email storage) -...

> **[Page Not Found- Low-cost email address - 1GB email storage - Block spam - Web...](http://account.mysite.com/login)**
>
> emailMyName personal email from mySite.com. Half the standard price of Yahoo! and Hotmail. With emailyMyName you get your name as your personal email address. emailMyName includes virtually unlimited storage - 1GB of storage (1024 MB email storage) -...

where www and account are two different controllers.

Thanks
