just changed the 403/404 checking logic to use regex.