Added Url rewrite functionality

I added a functionality for url rewrite that is based on the pull request #469. The difference is that it checks if it is an asset or not and normalize the path if there is an asset. It does the check by checking if there is an HTTP referer on the request. Only webpage assets/resources have an HTTP referer, because they originate from a web page.