# Redirect app to 2 URLs

**URL:** <https://www.ruby-forum.com/t/redirect-app-to-2-urls/153726>\
**Category:** Deployment\
**Created:** [November 20, 2008, 4:25pm UTC](https://www.ruby-forum.com/t/redirect-app-to-2-urls/153726 "2008-11-20T16:25:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![srinathbtech](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7bcc69/32.png) [@srinathbtech](https://www.ruby-forum.com/u/srinathbtech)\
**Post date:** [November 20, 2008, 4:25pm UTC](https://www.ruby-forum.com/t/redirect-app-to-2-urls/153726/1 "2008-11-20T16:25:32Z")

</div>

Hi,

I was wondering how to redirect my app to two different URLs,  
i am using apache over mongrel and running under production env.  
i have 2 domains located say [www.domain1.com](http://www.domain1.com) and [www.domain2.com](http://www.domain2.com).

when i hit [www.domain1.com](http://www.domain1.com) my app should redirect to ‘account/login’  
and when i hit www.domain2 my app should redirect to ‘/home/home’ and  
runs with single server and single app only

I was finding URLs in my app by using ‘request.host’ method.

any help !!

thanks  
sri…
