Hi all,
I use the subdomain to indicate the product eg. nexusphone.site.com . When a user types in that url I render the product/show view of that product. Users can also use domainnames eg www.nexusphone or nexusphone.com to render that product/show view.
www.site.com or site.com should render the home view which explains what my site is about.
I basically want to render the home view when www.site.com or site.com is entered. In all other cases I want to render the product/show view.
In my routes I have
map.club_root '', :controller => 'products', :action => 'show', :conditions => { :subdomain => /.+/ }
map.root :home
This works for the nexusphone.site.com example but not for nexusphone.com. Then it renders the home view.
Someone knows how I can solve this?
Thanks