# Masking sub-domain in routes?

**URL:** <https://www.ruby-forum.com/t/masking-sub-domain-in-routes/160648>\
**Category:** Rails\
**Created:** [February 18, 2009, 2:36pm UTC](https://www.ruby-forum.com/t/masking-sub-domain-in-routes/160648 "2009-02-18T14:36:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ressister](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/258eb7/32.png) [@ressister](https://www.ruby-forum.com/u/ressister)\
**Post date:** [February 18, 2009, 2:36pm UTC](https://www.ruby-forum.com/t/masking-sub-domain-in-routes/160648/1 "2009-02-18T14:36:54Z")

</div>

I have a rails app and a Mephisto CMS instance running on the same  
server. Currently I use the CMS to manage help articles related to the  
application. Mephisto runs on a sub-domain of the main domain, think  
[articles.mydomain.com](http://articles.mydomain.com).

I’d like my routes to work like this:

[http://www.mydomain.com/help](http://www.mydomain.com/help) =\> [http://articles.mydomain.com/help](http://articles.mydomain.com/help)

/help in my app would point to the appropriate path in my Mephisto  
CMS. What’s the best way to do this? Do I use Rails routes + Apache  
virtualhost? Let me know your thoughts. An example would be really  
helpful too.

Thanks!
