Use DOCUMENT_URI instead of REQUEST_URI

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.