How can I consider the following string as an invalid URL path because it actually contains a hostname and not represents a valid path:
/<>//google.com
By using the following regex validation code:
preg_match(""/(?:[\w-]+\.)+[\w-]+/"", $url, $matches);
I currently receive true
for both:
/<>//google.com
and /3.2/
while "/3.2/" is a legit URL path and not a domain name