Forum Discussion

Svevak_211593's avatar
Svevak_211593
Icon for Nimbostratus rankNimbostratus
Sep 26, 2017

redirect specific datagroup from http to https

Hello,

I would like to redirect from http to https, but only for one specific datagroup.

Is this possible:

if {[IP::client_addrs] equals "datagroup-xyz"} {
HTTP::redirect https://www.example.de[HTTP::uri]    
}

Thank you!

3 Replies

  • Almost, try this iRule:

    if { [class match [IP::client_addr] equals datagroup-xyz] } {
        HTTP::redirect https://www.example.de[HTTP::uri] 
    } 
    
  • Hi,

    you need to add the operator, try the following

    when HTTP_REQUEST {
    
    if { [class match [IP::client_addr] equals datagroup-xyz] } {
        HTTP::redirect https://www.example.de[HTTP::uri] 
    }
    
    }  
    

    Let us know if it works

    Regards

  • Hey, yes this worked for me perfectly! Thank you!!

     

    One more question. How would I implement an exception like for the crossdomain.xml or index.php etc?