I'm trying to detect the URI with a possibility of there being get params etc. I just need to get the /val1/val2 regardless if there is any url get params etc. how can I do this in php?
Thanks
$regex = '/^\/index.php?(.*)?\?+$/';
// Here are some example URLS
site.com/val1/val2
site.com/index.php/val1/val2
site.com/index.php/val1/val2?get1=val1&get2=val2
I want to be able to group the (/val1/val2) no matter what is on the left or right of the uri
