YaCy uses Overlays for the httpserver. The code is in httpFileHandler.java.
If you try to reach "http://localhost:8080/foo.html", it looks in these files(assuming, "de" is your current locale):
htroot/locale/de/foo.html htroot/foo.html DATA/HTDOCS/foo.html
If you load a folder, like "http://localhost:8080/foo" it looks for the defaultfiles:
index.html dir.html welcome.html [for more see the "defaultFiles" config option]
in these folders:
htroot/locale/de/foo/ htroot/foo/ DATA/HTDOCS/foo/
(note that it looks for each defaultfile in these folders, not in each folder for a defaultfile. this means, even if the first folder contains one of the defaultfiles, the last folder will be used, if it contains a defaultfile, which comes in the "defaultFiles" property before the defaultfile in the first folder)
if no default file is found, it uses "htroot/htdocsdefault/dir.html" to generate a dirlisting of the folder.