BusyBox httpd executes the ./cgi-bin/index.cgi
if it exists. This is similar to index.php
but with the /cgi-bin/
folder.
So for example I have the structure:
/api/
cgi-bin/index.cgi
/blog/
cgi-bin/index.cgi
/rss/
cgi-bin/index.cgi
So when request are going to http://example.com/api/
they are actually handled by the /www/api/cgi-bin/index.cgi
script.
When requested http://example.com/blog/
it's processed by /www/blog/cgi-bin/index.cgi
but the /blog/rss/
path is processed by /www/blog/rss/cgi-bin/index.cgi
.
But now I also want to support the Lighttpd webserver. How can I achieve that?
This seems similar to Making lighttpd redirect from www.example.com to www.example.com/cgi-bin/index.pl but much more complicated.