so you need merge if ( $host !~* "[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}" ) and if ( $host ~* "(.*)\.*\.{2,4}" ) On Thu, 30 Jul 2009 20:23:52 +0300, CactO_o's <nginx-forum at nginx.us> wrote: > if ( $host ~* "(.*)\.*\.{2,4}" )