How do I customize PHP’s built-in webserver so that it automatically renders the index.php or index.html file in the directory where it’s being redirected. It’s equivalent in Apache is the directory index:
<IfModule dir_module>
DirectoryIndex index.html index.php
</IfModule>
I’ve already done an eyeball search and ctrl+f on php.ini for the word “directory” but no luck.
What file do I have to edit when I’m making use of PHP’s built-in webserver?
The new built in server is pretty bare bones, so lacks many of the features of Apache. By default it should automatically render the index.php or index.html, from the doco:
The only way I’ve found that you could alter which page is used (i.e. to emulate changing the DirectoyIndex directive) would be to use a router script:
If you are at the point you need to mess around with the directory index, maybe it is time to use a proper web server?