views:

82

answers:

1

Hi,

I am using the account_location plugin in my rails app and have the following route

map.root :controller => "dashboard", :action => 'index'

This route match's on both subdomain.domain.com and www.domain.com

How can I set it up so these two domains match different routes?

Thanks, Andy

+1  A: 

This is kind of an indirect answer, but you might want to look into using subdomain_fu. If you use subdomain_fu you'll be able to change that route.

For example:

map.root :controller => "dashboard", :action => 'index', :conditions => { :subdomain => false }

would not match requests with a subdomain.

Here's a great Railscast if you're interested.

Andy Gaskell