This blog post aims to produce a function that will take a request url and make sure it maps into the document root of the server.