Skip to main content
Known Participant
March 24, 2009
Answered

detecting local or remote host

  • March 24, 2009
  • 1 reply
  • 299 views
Hi,

I set a couple of folders in my Application.cfm, I want to change them to suit the file structure depending if it is on localhost or remotehost can this be done?

Thanks,

R.

    This topic has been closed for replies.
    Correct answer Newsgroup_User
    you can utilise the CGI variables, particularly cgi.server_name or
    cgi.http_host. i.e:

    <cfif findnocase("your-remote-host-name", cgi.http_host)>
    ... set remote vars...
    <cfelse>
    ...set local vars...
    </cfif>

    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com/

    1 reply

    Newsgroup_UserCorrect answer
    Inspiring
    March 24, 2009
    you can utilise the CGI variables, particularly cgi.server_name or
    cgi.http_host. i.e:

    <cfif findnocase("your-remote-host-name", cgi.http_host)>
    ... set remote vars...
    <cfelse>
    ...set local vars...
    </cfif>

    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com/