USE
$_SERVER['HTTP_REFERER'];
your output is http://el.oprpg.com/admins/josh/
AND
$_SERVER['PHP_SELF'];
/admins/josh/t2.php
then use function stristr() if .php exist on
$_SERVER['PHP_SELF']; or substr()
then add string to
$_SERVER['HTTP_REFERER'];
you could come out
http://el.oprpg.com/admins/josh/t2.php
sorry im out of my desk cant create code and test it