Have you ever gone to a website and gotten a file listing instead of webpage? That’s not something you want happening. First it confuses your visitors, second no one should be viewing your directories for security reasons.
To prevent directory viewing you can stick a index.html file in each directory. Perhaps just a list of links pointing your visitor to the main sections of your website.
Or you can edit your .htaccess file and add
Options -Indexes
This will return a 403 error to the visitor.
Or you can edit your .htaccess file and add
DirectoryIndex missing.html
Then when a user tries to view a directory your ‘missing.html’ file will be shown. You can chose any file you want it doesn’t have to be missing.html.
0 responses so far ↓
There are no comments yet...Kick things off by filling out the form below.
You must log in to post a comment.