Forum Discussion

cup_cup_103603's avatar
cup_cup_103603
Icon for Nimbostratus rankNimbostratus
Apr 25, 2007

Rewrite Redirects

Hi all, where can I find the option as in previous version that "Rewrite Redirects = All" ?

 

I use a rule to redirect HTTP to HTTPS :

 

 

when HTTP_REQUEST {

 

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

 

}

 

 

But it'll redirect me to http and https several times, in the old version, I can set "Rewrite Redirects" to All in Proxy property to avoid this.

 

 

Thanks.

3 Replies

  • Deb_Allen_18's avatar
    Deb_Allen_18
    Historic F5 Account
    In v9, you can configure Rewrite Redirects functionality in the http profile(Local Traffic / Profiles / Services / HTTP): Create a new profile based on "http", check the "Custom" box next to "Redirect Rewrite" and select something other than "None" from the dropdown:

     

     

    * None: Specifies that the system does not rewrite any HTTP redirect responses.

     

    * All: Specifies that the system rewrites the scheme to HTTPS in all HTTP redirect responses.

     

    * Matching: Specifies that the system rewrites the scheme to HTTPS in any HTTP redirect responses in which the hostname matches that of the request.

     

    * Nodes: Specifies that if the redirect target contains a node IP address instead of a host name, the system rewrites the scheme to HTTPS and the hostname to the VS address.

     

     

    /deb

     

  • Deb_Allen_18's avatar
    Deb_Allen_18
    Historic F5 Account
    Oops, forgot to add you have to apply the newly-created profile to the HTTPS virtual server instead of the default "http" profile.

     

     

    /d