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

softwareengineer 99 softwareengineer99 at yahoo.com
Sat Jan 28 07:35:44 GMT 2006


 I am trying to setup an application where the URLs must be of the format
  
  1) sub.domain.com/sub/category
  and
  2) sub.domain.com/search/something
  
  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?
  
  
  Thanks 
  
  Frank
  

		
---------------------------------
Bring words and photos together (easily) with
 PhotoMail  - it's free and works with Yahoo! Mail.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060128/ab46873e/attachment.html


More information about the Rails mailing list