Reputation: 5132
Currently, I use a PHP script to list the contents of a directory that does not have an index file, but I don't want to have to copy it to every directory without an index.
Can Apache do it automatically?
Edit: after searching more i found a way which is to put Option -Indexes and then use that php file as a custom 403 page. source: https://stackoverflow.com/a/10988954/649239
Upvotes: 0
Views: 139
Reputation: 5132
after searching more i found a way which is to put Option -Indexes and then use that php file as a custom 403 page.
Upvotes: 0
Reputation: 1002
You really to need a strong reason to do this, but assuming you have one...
Just have one php file that accepts the directory as a parameter and use it to print it out.
You could also make it recursive to show all sub directories :) now you've got me excited.
Upvotes: 1