public static function properRule($rule, $link)
    {
        if (isset($rule->pattern)) {
            if (preg_match($rule->pattern, $link) > 0) return true;
        }
        if ($rule instanceof GroupUrlRule) {
            foreach ($rule->rules as $nextRule) {
                if (preg_match($nextRule->pattern, $link) > 0) return true;
            }
        }
        return false;
    }