- From: Jeffrey Chandler <jeffrey.chandler@gmail.com>
- Date: Mon, 1 May 2006 10:48:43 -0400
- To: "Philip Semanchuk" <philip@semanchuk.com>
- Cc: www-validator@w3.org
Phillip, You described my situation exactly. The webpage is up one directory, but the img directory is back down one directory. So the website is listed at http://myhost.com/dir1/index.html, but the images for the site are back down one level at http://myhost.com/img/image.jpg, so instead of using the full path to the image, the code in dir1/index.html accesses the images by going back one level and up to the img/ directory "../img". Is there a way for the validator to ignore this type of entry. The reason I ask is because it takes up a large portion of the report for our site even though it is simply a warning, and not a truly "broken" link. y Thanks, Jeff On 5/1/06, Philip Semanchuk <philip@semanchuk.com> wrote: > On Apr 28, 2006, at 2:56 PM, Jeffrey Chandler wrote: > > Hello, > > > > First of all, I would like to point out that I am not a web-designer, > > but I have been tasked with setting up the link checker software > > locally on one of our systems to check a production site for broken > > links. After running checklink from the command line, a significant > > portion of the report is due to the following: > > > > http://myhost.com/../img/image.jpg > > > > What to do: Usually the sign of a malformed URL that cannot be parsed > > by the server. > > Response status code: 400 > > Response message: Bad Request > > > > The link still works, but the Link Checker is complaining due to the > > "dot dot slash" notation in the markup. The links to these images > > work fine from the site, but the Link Checker does not list it as > > valid. > > > > Is there a way to have the Link Checker ignore code that uses this > > notation, or should our developers use the absolute path or a > > different coding convention? > > Hi Jeffrey, > My guess is that the link checker is not complaining about the use of a > relative path, but rather that the relative path doesn't make sense. > Reading from left to right, that URL says: > 1) Start at the root > 2) Move up one directory (!) > 3) Move down into the img directory > > Step 2 doesn't make sense because you're already at the highest level > you can go. The specification that governs path interpretation (RFC > 3986: http://asg.web.cmu.edu/rfc/rfc3986.html#sec-5.2.4) says that > leading ".."s should be ignored, so a browser looking at that link > would be correct in resolving this: > http://example.com/../img/image.jpg > to this: > http://example.com/img/image.jpg > > I guess that's what's going on in your case? Anyway, the Link Checker > is probably just trying to warn you that what you coded doesn't make > logical sense even though it is syntactically valid and your browser > handles it. > > HTH > Philip > > >
Received on Monday, 1 May 2006 14:49:11 UTC