changed $_SERVER[REDIRECT_URL] to $_SERVER[REQUEST_URI]