(smartssl) { # SmartSSL by adryd # Redirect browsers with TLS 1.2 support @smartssl { protocol http header User-Agent "*MSIE 11*" header User-Agent *spider* header User-Agent *crawl* header User-Agent *bot* header User-Agent *Bot* header User-Agent *Edge/* # If iPhones on iOS 4 and below, and Android phones on Android 4 and below become a problem, I'll consider changing this. header User-Agent *iPhone* header User-Agent *Android* } @smartssl2 { protocol http header_regexp User-Agent "((Firefox/(1\d\d|[3-9]\d|2[7-9]).)|(Chrome/(1\d\d|[3-9]\d).)|(Version/(\d\d|[89])\..+ Safari/))" } redir @smartssl https://{host}{uri} redir @smartssl2 https://{host}{uri} }