I’m working on a generic index script (php) that I would eventually like to use as a default index when users navigate to an open directory.
For example, if I go to www.mydomain.com, and index.html exists in that directory, then index.html will be displayed, as expected…
If, however, I navigate to an open directory (say, www.mydomain.com/photography) containing no index.html/php/txt, then I would like the generic index to be displayed.
I have this part working, after adding the following line to .htaccess:
DirectoryIndex index.html index.php index.txt /genericindex/index.php
The only problem now is that /genericindex/index.php is pulling content (files and folders) from its own directory (/genericindex/) rather than the directory it’s “subbing in for”. Is there a way I can have /genericindex/index.php think it’s in the directory that it’s working for?
Thanks for any help!