I have the following 3 urls
http://www.yahoo.co.uk and http://yahoo.co.uk, the difference being that the later doesn't have www in it. When using parse_url on both these url's, the output is the following.
{"scheme":"http","host":"www.yahoo.co.uk"}
{"scheme":"http","host":"yahoo.co.uk"}
Both url's being the same, comparing them using a == or using strpos or explode the text with . and compare each array doesn't seem to be ideal.
I have looked at the other questions on Stack Overflow that discusses about comparing URL's but they don't seem to be addressing the issue I have mentioned above. Appreciate if someone could help me figure out how to solve this issue.
/index/?module=blah?www.DOMAINhas to be the same asDOMAIN, although it usually is.