February 21, 2016

Web Server: Enable Directory Listing / Directory Browsing with .htaccess & create files with no name

Web Servers hide the contents of folders by default. If there’s no index.html or index.php file, it will show a “403 Forbidden” error. That means that the folder exists, but you don’t have access to it. Different from a “404 Not Found” error, meaning no such folder exists.
If you want to see the files inside all folders, you need to put this .htaccess file in the directory you want to enable
Download htaccess zip http://www.mediafire.com/download/qm398c6l99xl8o8/htaccess+File+Inside.zip
UnZip it and it should work. (This is if you’re having trouble creating files with no name, only an extension)

➤Create .htaccess file
-Open notepad (or other text editor)
-Save a blank file called “.htaccess” (no filename just an extension)
-Make sure you change the “Save as Type” dropdown from “Text Document *.txt” to “All files”
-Use ftp software to copy the .htaccess file to your web server
-You might need to “Show hidden files” in order to see it

➤Configuring htaccess
➨”Options +Indexes”
-Adding this enables the list of files in the folder
-Capitalization doesn’t matter
-You can comment out lines with a hashtag/number sign (#)
➨”IndexOptions FancyIndexing”
-This changes the display
➨”Options -Indexes”
-this hides the listings. Add a new .htaccess file in a subfolder to disable directory listing in that folder and keep it active in the containing folder
➨”DirectoryIndex 1.txt”
-This sets the default page to load instead of index.html or index.php (as long as 1.txt exists)
➨”IndexIgnore *.txt *.doc”
-This excludes any files with the extension txt & doc from the list
-They’re still accessible by direct URL, but just won’t show up if directory listing is enabled

More Detailed video https://www.youtube.com/watch?v=hsaaVCB55dQ

Leave your comment

Scroll Up