From: Casimir P Date: 2007-11-03T17:41:28+09:00 Subject: Re: Eruby - How to get my grubby mittens on the URL? On Thu, 01 Nov 2007 15:42:59 -0500, justincollins wrote: > Casimir P wrote: >> Suppose I have some ruby code in a .rhtml -file, which is processed by >> eruby. How can I get the url string of the page? (so I can chop it up). >> > I think this depends somewhat on your environment [deleted some] > but try adding > > puts ENV.inspect > Yup. Hehe, kinda simple. Didnt find anything in-depth, but there was enough in what I think most call the pickaxe. http://www.ruby-doc.org/docs/ ProgrammingRuby/html/web.html (see code example at the end of "Using Eruby"). What I wanted was to see what URI was requested, the bit after the domain, ie.: <% puts ENV["REQUEST_URI"] %> Now, if I only could figure out how to redirect *all* requests to one and the same .rhtml in the site root without actually rewriting the url user sees... Already caused a few infinite redirect loops 8) -- Casimir P Art Portfolio: http://csmr.dreamhosters.com