Forum Discussion
conditional statement for Client Cert CN checking and redirecting accordingly is not working
when RULE_INIT { set static::debug 1 }
when CLIENTSSL_CLIENTCERT { Example Subject DN: /C=AU/ST=NSW/L=Syd/O=Your Organisation/OU=Your OU/CN=John Smith set subject_dn [X509::subject [SSL::cert 0]] if { $subject_dn != "" }{ if { $static::debug }{ log "Client Certificate received: $subject_dn"} } } when HTTP_REQUEST { if { [HTTP::host] contains "192" } { if { $subject_dn contains "CN=Vinit-A" } { HTTP::redirect "/vinit-A.html" pool test } } elseif { $subject_dn contains "CN=Vinit-B" } { HTTP::redirect "/vinit-B.html" pool test } elseif { $subject_dn contains "CN=Vinit-C" } { HTTP::redirect "/vinit-C.html" pool test } elseif { $subject_dn contains "CN=Vinit-D" } { HTTP::redirect "/vinit-D.html" pool test } }
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com