Skip to main content
Participant
September 16, 2008
Answered

Switch user from http to https

  • September 16, 2008
  • 1 reply
  • 367 views
I have a customer intranet that now needs to be exposed to the internet. The problem I now have is how to determine a users ip and then compare it to another list that is internal versus external.

I know I can get the users IP using CGI variables, what I am not sure of is what the best way to define the internal network(192.168.0.0) or external ( anything else) and redirect them to http or https. So basicly if your ip starts with 192.168.???.*(I have multiple subnets that do and do not need access) then you can use http. Anyhting else goes to https.

I would a appreciate any ideas or even better examples..

Thanks,
Chris
    This topic has been closed for replies.
    Correct answer cz3452
    Wow, I feel silly.... That will work!
    Thanks,
    Chris

    1 reply

    Inspiring
    September 16, 2008
    Chris,

    Something like this?

    <cfif CGI.REMOTE_ADDR DOES NOT CONTAIN "192.168">
    <cflocation addtoken="no" url="https://www.whatever.com">
    </cfif>

    --
    Ken Ford
    Adobe Community Expert Dreamweaver/ColdFusion
    Adobe Certified Expert - Dreamweaver CS3
    Fordwebs, LLC
    http://www.fordwebs.com


    "cz3452" <webforumsuser@macromedia.com> wrote in message
    news:gannp0$li4$1@forums.macromedia.com...
    >I have a customer intranet that now needs to be exposed to the internet.
    >The
    > problem I now have is how to determine a users ip and then compare it to
    > another list that is internal versus external.
    >
    > I know I can get the users IP using CGI variables, what I am not sure of
    > is
    > what the best way to define the internal network(192.168.0.0) or external
    > (
    > anything else) and redirect them to http or https. So basicly if your ip
    > starts
    > with 192.168.???.*(I have multiple subnets that do and do not need access)
    > then
    > you can use http. Anyhting else goes to https.
    >
    > I would a appreciate any ideas or even better examples..
    >
    > Thanks,
    > Chris
    >
    >

    cz3452AuthorCorrect answer
    Participant
    September 16, 2008
    Wow, I feel silly.... That will work!
    Thanks,
    Chris