I'm going to make the assumption that we are talking about a Rails app. The easiest way I found was to call request.host_with_port within a controller or a view. This will return the host name and the port number (if provided). I use this approach to figure out which Google Maps api key to use in my application (one for development work, another one for the "production" site). There is a very active mailing list for Ruby on Rails. You can get details on how to subscribe by going to http://groups.google.com/group/rubyonrails-talk?hl=en . Hope this helps. Fred On 1/2/07 7:15 AM, "marco" <marco.burlando / gmail.com> wrote: > In a web application > > On Jan 2, 2:34 pm, Robert Klemme <shortcut... / googlemail.com> wrote: >> On 02.01.2007 14:19, marco wrote: >> >>> Do you know a method for find address of the server ? >>> I have to do an "if" to find if I am in localhost:3000 or in >>> mydomain.comIn what kind of application? >> >> robert > > -- Frederic Jean fred / fredjean.net http://typo.fredjean.net/