# Map.root by domain?

**URL:** <https://www.ruby-forum.com/t/map-root-by-domain/139430>\
**Category:** Rails\
**Created:** [June 3, 2008, 9:40pm UTC](https://www.ruby-forum.com/t/map-root-by-domain/139430 "2008-06-03T21:40:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![giga](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/b9bd4f/32.png) [@giga](https://www.ruby-forum.com/u/giga)\
**Post date:** [June 3, 2008, 9:40pm UTC](https://www.ruby-forum.com/t/map-root-by-domain/139430/1 "2008-06-03T21:40:59Z")

</div>

Is it possible to set map.root by domain?

If domain is: “[domain1.com](http://domain1.com)” then map.root :controller =\> “domain1”  
Else if domain is: “[domain2.com](http://domain2.com)” then map.root :controller =\> “domain2”
