<?php $ignore = array('site1.com', 'site3.com'); if(in_array($site, $ignore)){ header("location: ".$site); }