Stripping query string from REQUEST_URI

Stripping query string from REQUEST_URI when comparing to base_url.
Prevent redirect of base_url when query string exists

Merge remote-tracking branch 'origin/pr/817' into develop

* origin/pr/817:
  Stripping query string from REQUEST_URI