// TODO: Pseudocode
// Allocate memory for (path/index.html and path/index.php, respectively)
// copy path into char *pi
// concatenate 'pi' with '/index.html' ('/index.php')
// check if pi exixsts using access()
// if it does return pi
('path/index.html' or 'path/index.php', respectively)
// else free 'pi' and return NULL
Is this the way to go?