is there any way to set a default page for all folders on server that don’t have an index file?
Like a general 404 page?
The idea is to prevent browsing through folders with no index file
Can this be achieved with .htaccess or php?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Put
in your httpd.conf
However, if you’re wanting to prevent folder browsing, this won’t help. You’ll have to disable folder browsing in the first place: