Forum Discussion

  • JW_189984's avatar
    JW_189984
    Historic F5 Account

    Hi,

    The irule below should meet your requirement.
    when HTTP_REQUEST {
        if { [string tolower [HTTP::host]] ends_with ".cnnic.net.cn" } {
            HTTP::redirect "https://whois.cnnic.cn[HTTP::uri]"
        }
    }
    
  • Can be written some thing like this also.

            when HTTP_REQUEST {
                if { [string tolower [getfield [HTTP::host] ":" 1]] eq "whois.cnnic.net.cn" } {
                    HTTP::redirect "https://whois.cnnic.cn[HTTP::uri]"
                    }
                }