def to_uri(url)
      uri = URI.parse(url)
      uri.host.nil? ? false : uri
    rescue URI::BadURIError
      false
    rescue URI::InvalidURIError
      false
    end
def to_uri(url)
      uri = URI.parse(url)
      uri.host.nil? ? false : uri
    rescue URI::BadURIError
      false
    rescue URI::InvalidURIError
      false
    end
Transforms an URL (String) to an URI. If URL is not valid false is
 returned