if(is_member_of($bbuserinfo, groupid)) { header ('Location: http://www.domain.com/file.com'); } else { header ('Location:http://www.domain.com'); }