wget doesn't check for index.html when a directory doesn't have a trailing slash
"[email protected]" via Primary discussion list for GNU Wget <[email protected]> Sun, 22 Jun 2025 04:58:41 +0000 (UTC)
| Newsgroups | gmane.comp.web.wget.general |
|---|---|
| Message-ID | <[email protected]> |
It's become common practice to have website URLs point to a directory rathe= r than an HTML file. So rather than "example.com/foo.html", one would go to= "example.com/foo", which is a directory that contains an "index.html" file= , and the server is configured to return that file when the directory is re= quested. (Often the directory will also contain any images or other related= files that are needed by index.html.) wget seems to only realize this when the link ends in a trailing slash. Tha= t is, if the homepage at example.com includes a hyperlink to "example.com/f= oo/", wget will correctly download=C2=A0example.com/foo/index.html. But if = the homepage links to=C2=A0"example.com/foo", wget will not recognize that = this is a reference to an index.html file, and it will not be downloaded pr= operly. Isaac King