(note: this was previously discussed in #452 (comment))
When deploying HTML files to some common platforms like Netlify or Gitlab Pages (or even on a typical Apache HTTP environment), you can rely on the platform to use an "index file", namely, for an URL like https://example.com/foo, it will serve ./public/foo/index.html if such a file exists.
Typically, a document called index.html will be served when a directory is requested without a file name being specified. For example, if DocumentRoot is set to /var/www/html and a request is made for http://www.example.com/work/, the file /var/www/html/work/index.html will be served to the client.
This means that, the heuristic should look like this:
- is the "index file" feature enabled?
- if so, does the URL naturally resolve to a folder?
- if so, does the folder contain a file called
index.html (or index.htm, maybe allow passing a list when enabling the feature)
- if so, the URL is actually valid
The feature could be enabled as lychee --allow-index-file index.html (where the name is used in 3)
(note: this was previously discussed in #452 (comment))
When deploying HTML files to some common platforms like Netlify or Gitlab Pages (or even on a typical Apache HTTP environment), you can rely on the platform to use an "index file", namely, for an URL like
https://example.com/foo, it will serve./public/foo/index.htmlif such a file exists.This means that, the heuristic should look like this:
index.html(orindex.htm, maybe allow passing a list when enabling the feature)The feature could be enabled as
lychee --allow-index-file index.html(where the name is used in 3)