I printed $_SERVER, and I found out that $_SERVER[\'REDIRECT_URL\'] vs $_SERVER[\'REQUEST_URI\'] both have same values. What\'s the difference betw
REQUEST_URI is the requested URI path and query as used in the HTTP request line. REDIRECT_URL is created by Apache when an internal redirect happens:
REDIRECT_environment variables are created from the environment variables which existed prior to the redirect. They are renamed with aREDIRECT_prefix, i.e.,HTTP_USER_AGENTbecomesREDIRECT_HTTP_USER_AGENT.
REDIRECT_URL,REDIRECT_STATUS, andREDIRECT_QUERY_STRINGare guaranteed to be set, and the other headers will be set only if they existed prior to the error condition.
Note that REDIRECT_URL does only contain the URI path.