allow the path of the responses to be configurable
remove trailing and leading slashes instead and added a 404 error