Forum: Ruby on Rails [Frank] How can I access the domain name in routes.rb?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
F68e4842b0a5487678e26046fdb2fdf3?d=identicon&s=25 softwareengineer 99 (Guest)
on 2006-01-28 08:36
(Received via mailing list)
I am trying to setup an application where the URLs must be of the format


  In the first path the first part of the subdomain must match the
folder name.

  I tried to use request.domain(2) to get the domain information but
keep getting errors.

  I was thinking that may be I can setup regexp to math the subdomain
name with the folder but to no avail.

  My questions are:
  How can I setup the proper routes for these URLs?
  How can I access the domain name in routes.rb?


This topic is locked and can not be replied to.