Fix for URIs with parameters

REQUEST_URI includes any '? ...' parameters in the path, so the server looks for
'/path/to/document?param' instead of '/path/to/document'. So, this isn't
noticible if you don't have parameters attached to your URL.