Added loose match 404 redirect prevention