How to repeat default uhttpd index script

I need uhttp to provide a different directory listing output format, so that silly screen scraping apps (like kodi) can read the directories.

I can perfectly well make uhttpd use an index.php script by setting the option "index_page index.php", but that means i need to have a copy of the index.php script in every subdirectory. Which doesn't work for me.

Is there any way how i could configure uhttpd so that it can use one single script for all subdirectories ?

Please explain a little more about why this does not work, and the actual functionality.

Just trying to create a webserver on the openwrt router serving files via https to kodi clients. Aka: mounting via samba read-only from inside server, exporting to outside the home when i am travelling.

Problem is that kodi has to screen scrape the output of directory listing (directory listing has no well-defined output format), and they've implemented that for a few well known standard http server formats. And uhttpd uses its own. SO i tried to have a php script in uhttpd for the directory output. But i since read uhttp source code and there is no way to have a default script applied to every directory.

So, i am not using lighttpd which is supported by kodi. Works fine.