> Dave Tweed wrote: > >>> To find out whether a path is relative or absolute depends on what >>> kind of paths you can expect on the input. If it's either a complete >>> http URL (starting with "http:") or a relative path, then that's it: >>> check for a starting "http:". >> >> The presence or absence of the optional scheme field does not >> determine whether a URL path is absolute or relative -- it's the >> leading slash after that (single or double) that tells you. > > That depends on what the specific spec of the OP determines. It could > very well be that a path "/NormallyConsideredAbsolutePath/file.ext" is > considered a "relative" path, relative to a base path, say > "http://myserver/" (or even relative to > "http://myserver/MyTopLevelDir/"). It all depends on the specific > situation and how the "relative" paths are created. > > This also determines to what depths he needs to go in parsing the paths. > > Gerhard This is what I'm afraid of... The proposed standard just says the URL can be absolute or relative. It does not limit how convoluted it may be. In evaluating URLs, I'd always thought that // preceded the host, and / preceded the path or file. In a relative URL, we should never see //. If the URL starts with /, we're starting at the base or root of the server directory tree. If it starts with anything else, we're starting from the path to the file this was referenced in. I just tried accessing a URL by adding the relative URL to the previous URL, and it seems to work. This will make it a lot easier than my trying to make the URL absolute. My test URL was http://www.hallikainen.com/FccRules/2009/36/382/../../../2008/36/382/index.php . Thanks for the help! Harold -- FCC Rules Updated Daily at http://www.hallikainen.com - Advertising opportunities available! -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist