We know that we can find our scripts and parametres by using php's $_SERVER[REQUEST_URI]
.
My problem with this is that querying the default script (page) with $_SERVER[REQUEST_URI]
will always return the full script. Both https://www.apple.com/index.html
and https://www.apple.com/
will return index.html
.
If a user has landed on the default page (https://www.apple.com/
), then is there a way that we may query the URI and have either /
or (NULL) returned?
(As a background to this question, what I am ultimately trying to do is clean up indexing duplicate errors from Google, specifically.)
Server model is LAMP (CentOS 6), if this helps.