factored out method to recognize local/remote URL's (the previous approach did not recognize https links...)