The URI class cannot help you; it can only determine if two URIs are the same URIs, and they are only the same URI if they have the same server name / IP address.
The best option is to load a resource from both URLs and see if it is the same resource, checking for equality and assuming that two resources are the same resource if they are the same sequence of bits.
, . -, " " URI, , , ... - Thiado de Arruda
, , , , , , .
- . URI.Host URI, , . .