I have a ajax request to https://foo.bar.example.com/lib/foo/bar/ajax.php?
/var/www/html/lib/
is a symbolic link to /var/www/application/lib/
.
Within /var/www/application/lib/foo/bar/ajax.php
, I need to determine whether the original page where the ajax request originated from had one of the following three directory paths:
/lib/someSpecificFile.php
(i.e. https://foo.bar.example.com/lib/someSpecificFile.php?a=b)/someSpecificDirectory/index.php
(i.e. https://foo.bar.example.com/someSpecificDirectory/index.php?a=b or https://foo.bar.example.com/someSpecificDirectory/)- Any other path.
How can this be accomplished?