I have this problem. FOr example I have this URL http://site-myname.testingsite.localhost/auth/register?r=, uwing $_SERVER['REQUEST_URI'] I am able to get the value 'auth/register?r='. Now what I want to do is to check using regex and preg_match '/auth/register?r=' or '/auth/register?r=anyvalue' so that if any user who will have query string 'r' with any value or null value will be under scope.
My initial solution is:
preg_match('#/auth/register\?r=^$#', $_SERVER['REQUEST_URI'])
But it doesn't seem to work. Please help me! I'm stuck in this problem for an hour now and I don't want to waste time.. Answers will be much appreciated, thanks!