# Unique domain name routing

**URL:** <https://www.ruby-forum.com/t/unique-domain-name-routing/112849>\
**Category:** Rails\
**Created:** [August 23, 2007, 9:04pm UTC](https://www.ruby-forum.com/t/unique-domain-name-routing/112849 "2007-08-23T21:04:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![adamdorsey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ed8c4c/32.png) [@adamdorsey](https://www.ruby-forum.com/u/adamdorsey)\
**Post date:** [August 23, 2007, 9:04pm UTC](https://www.ruby-forum.com/t/unique-domain-name-routing/112849/1 "2007-08-23T21:04:17Z")

</div>

I am setting up a direct mail service with ruby on rails and have a  
question before I get going. I apologize, as I am new to this glorious  
framework.

What I need:  
I am setting up a direct mail campaign, using variable data printing. On  
the postcard the user will see a personalized URL, like  
[http://domain.com/joesmith](http://domain.com/joesmith), I want rails to recognize ‘joesmith’ as a  
variable and not an actual directory, then hit the database and display  
a personalized landing page.

Do I somehow setup that up using a ‘dynamic’ controller of some sort, or  
can I specify a custom method in the routing ruby file, to handle the  
dynamic URL?

Thanks for the help,  
Adam
