passenger_library icon indicating copy to clipboard operation
passenger_library copied to clipboard

linkchecker doesn't detect broken links on the same domain that miss the library prefix

Open OnixGH opened this issue 9 years ago • 2 comments

When checking http://domain/library/* then all links to http://domain/somethingelse are seen as external and ignored. However, this causes a specific error case not to be seen: url_for links that have a non-existing destination.

For example: url_for('/install/valid.html') ==> http://domain/library/install/valid.html url_for('/install/invalid.html') ==> http://domain/install/invalid.html <-- not reported

OnixGH avatar Jul 20 '16 10:07 OnixGH

Linkchecker offers --check-extern (to proceed to "external" links), and with either --ignore-url REGEX or --no-follow-url REGEX we should be able to keep it to the same domain.

It's probably a good idea to start checking external links (without following) as well.

OnixGH avatar Jul 20 '16 11:07 OnixGH

For now, a simple Nginx workaround solves the immediate issue (by allowing use of linkchecker http://localhost/index.html):

location /index.html { return 302 sub/index.html; }
location / { deny all; return 404; }

OnixGH avatar Jul 20 '16 11:07 OnixGH