Updated the order of  variables so that ['REQUEST_URI'] is checked first.