# Domain names within app

**URL:** <https://www.ruby-forum.com/t/domain-names-within-app/176763>\
**Category:** Rails\
**Created:** [October 5, 2009, 11:47pm UTC](https://www.ruby-forum.com/t/domain-names-within-app/176763 "2009-10-05T23:47:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![clark](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/6de8d8/32.png) [@clark](https://www.ruby-forum.com/u/clark)\
**Post date:** [October 5, 2009, 11:47pm UTC](https://www.ruby-forum.com/t/domain-names-within-app/176763/1 "2009-10-05T23:47:56Z")

</div>

Hi-

I have an shopping cart rails app.

I would like to be able to host multiple domain names within the same  
shopping cart application.

I would like to be able to detect the domain name, and then set a  
parameter that tells what logo to display for that domain name.

Does anyone know how this can be done?

Thanks,  
Clark

---

<div class="post-metadata">

**Author:** ![clark](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/6de8d8/32.png) [@clark](https://www.ruby-forum.com/u/clark)\
**Post date:** [October 6, 2009, 1:10am UTC](https://www.ruby-forum.com/t/domain-names-within-app/176763/2 "2009-10-06T01:10:28Z")

</div>

On Mon, Oct 5, 2009 at 12:14 PM, Clark [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I would like to be able to detect the domain name, and then set a  
> parameter that tells what logo to display for that domain name.

Have you looked at the doc for the request object?

–  
Hassan S. ------------------------ removed\_email\_address@domain.invalid  
twitter: @hassan

---

<div class="post-metadata">

**Author:** ![clark](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/6de8d8/32.png) [@clark](https://www.ruby-forum.com/u/clark)\
**Post date:** [October 6, 2009, 6:39am UTC](https://www.ruby-forum.com/t/domain-names-within-app/176763/3 "2009-10-06T06:39:31Z")

</div>

Clark wrote:

> Hi-
> 
> I have an shopping cart rails app.
> 
> I would like to be able to host multiple domain names within the same  
> shopping cart application.
> 
> I would like to be able to detect the domain name, and then set a  
> parameter that tells what logo to display for that domain name.
> 
> Does anyone know how this can be done?
> 
> Thanks,  
> Clark

Hello,  
As per your post i think you are looking for multi sites concept.  
In multi sites it uses same code base and different views as per domain.  
i think this plugin help you. [http://github.com/dasil003/rails-multisite](http://github.com/dasil003/rails-multisite)

Thanks,  
Priyanka P.
