Absolute paths and URLs
You're right, absolute URLs in Linux should start with / , so checking for a slash at the beginning of the path will suffice.
For URLs you need to check http:// and https:// , however, as you wrote, there are more URLs starting with ftp:// , sftp:// or smb:// . Thus, it very much depends on what range of use you want to cover.
Invalid paths and URLs
Assuming you mean Linux, the only characters that are forbidden in the path are / and \0 . It actually depends a lot on the file system, however you can assume that this was correct for most applications.
On Windows, this is more complicated. You can read about this in the Path.GetInvalidPathChars documentation in the Remarks section.
URLs are more complex than Linux paths, since only valid characters are AZ , AZ , 0-9 , - 0-9 , _ , ~ , : , / ? , # , [ , ] , @ ! , $ , & , ' , ( , ) , * , + ; and = (as described in another answer here ).
Relative paths and URLs
In general, paths and URLs that are not absolute or invalid are relative.