For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Danielseyoum's avatar
Danielseyoum
Icon for Altostratus rankAltostratus
May 14, 2007

Redirecting from non standard port to https

I have a Virtual Server listening on port 55000 that I want to redirect to https:

 

Neither rules produced the intended result:

 

1.

 

rule redirect {

 

when HTTP_REQUEST {

 

HTTP::redirect https://[getfield [HTTP::host] ":" 1][HTTP::uri]

 

}

 

}

 

2.

 

rule redirect1 {

 

when HTTP_REQUEST {

 

HTTP::redirect "https://[HTTP::host][HTTP::uri]"

 

}

 

}

 

This what I see thru Http watcher:

 

StartTimeSizeMethodResultTypeURL

 

09:51:41.4370.030GET302Redirect to https://portal.sapinternal.net/http://portal.sapinternal.net:55000/

 

09:51:41.4672.0530GET302Redirect to https://portal.sapinternal.net:55000/index.htmlhttps://portal.sapinternal.net/

 

09:51:43.5200.040GET(Error 0x2f7d)*https://portal.sapinternal.net:55000/index.html

 

 

 

BTW: I am experiencing this issue using IE 6, but not with FireFox 2.0. Unfortunately the company standard is IE 6.

2 Replies

  • Try this

     

     

    when HTTP_REQUEST {

     

    if {[TCP::server_port] == 55000} {

     

    HTTP::redirect "https://[HTTP::host][HTTP::uri]"

     

    }

     

    }
  • Here is the rule that finally got to work:

     

     

    when HTTP_REQUEST {

     

    log local0. "I got the request as: [HTTP::host] and [TCP::local_port]"

     

    set message {SAP Portal

     

    }

     

    HTTP::respond 200 content [subst $message]

     

    }