Directory traversal
If we don’t set Directory traversal of then we can see any folder on website. Say for example – http://localhost/demo/mydir/
And it looks like –
So all the 3 folder are visible to public. Switching off the directory traversal we can hide this folder structure.
Navigate to your root directory or public html folder. IF you don’t have any “.htaccess” file then create it or if it already exists then add the following line –
Options All –Indexes
Now check it again –
So the user is now unable to traverse our folder structure.