Forum Discussion

joec_41569's avatar
joec_41569
Icon for Nimbostratus rankNimbostratus
Jan 31, 2008

redirect https to a specific url

How can I redirct traffic going to https to a specific URL.

 

 

For example if a user types in https://site.com, I would like it to redirect to https://site.com/logon

 

 

Thanks

 

 

Joe
  • hoolio's avatar
    hoolio
    Icon for Cirrostratus rankCirrostratus
    Hi Joe,

    Depending on which major version of BIG-IP you're running, you could post in the relevant iRules section (Click here 9.x or Click here 4.x).

    To send a redirect in 9.x, you can use a rule like this:

    
    when HTTP_REQUEST {
        Check if path is /
       if {[HTTP::path] eq "/"}{
           Send 302 redirect to the new location
          HTTP::redirect https://[HTTP::host]/logon
       }
    }

    To do this in 4.x, you can use a rule like this:

    
    if (http_uri == "/") {
       redirect to "https://" + http_host + "/logon"
    }

    Aaron

  • How can I redirect traffic going to https to a specific URL to https, however, with different ip

     

     

    For example if a user types in https://site.com, I would like it to redirect to https://sitexyz.com

     

     

    Thanks

     

     

    Luis
  • How can I redirect traffic going to https to a specific URL to https, however, with different ip

     

    For example if a user types in https://site.com, I would like it to redirect to https://sitexyz.com

     

    Just tell it the new location.

     

     

    HTTP::redirect https://your.new.site/.

     

     

    You can also add the original URI

     

    HTTP::redirect "https://your.new.site[HTTP::uri]"

     

     

    Regards

     

    Kurt Knochner