I recently shared several articles about .htaccess file, and as you may know by now, it's a great file if you're working on the security of your site. Today we'll disable the directory browsing in our website with some editing in .htaccess file.
You know how you can change a few characters in a URL and continue browsing the website. Sometimes, it could be very dangerous for our website, so it's time to prevent directory browsing.
Add following snippet to your .htaccess file:
Save the file, and that's it!
You know how you can change a few characters in a URL and continue browsing the website. Sometimes, it could be very dangerous for our website, so it's time to prevent directory browsing.
Add following snippet to your .htaccess file:
# directory browsing
Options All -Indexes
Save the file, and that's it!