{"id":362,"date":"2009-11-29T07:29:57","date_gmt":"2009-11-29T11:29:57","guid":{"rendered":"http:\/\/linuxhostingsupport.net\/blog\/?p=362"},"modified":"2009-11-29T07:32:58","modified_gmt":"2009-11-29T11:32:58","slug":"howto-disable-directory-listing","status":"publish","type":"post","link":"https:\/\/linuxhostingsupport.net\/blog\/howto-disable-directory-listing","title":{"rendered":"Howto: Disable Directory Listing"},"content":{"rendered":"<p><span style=\"color: #0000ff;\"><strong>How to Disable Directory Listing?<\/strong><\/span> You may want to <strong>hide directory listings<\/strong> because by default <strong>Webservers look for an index file under every directory<\/strong> and if not found, they list the files and directories under it on browsing the directory.<\/p>\n<p><strong>To disable Directory Listing<\/strong> for an account recursively:<\/p>\n<p><strong>1) Create a .htaccess file under the directory<\/strong><\/p>\n<blockquote><p><span style=\"color: #0000ff;\"><strong>vi .htaccess<\/strong><\/span><\/p><\/blockquote>\n<p><strong>2) Add Options directive as follows:<\/strong><\/p>\n<blockquote><p><span style=\"color: #0000ff;\"><strong>Options -Indexes<\/strong><\/span><\/p><\/blockquote>\n<p><strong>3) Save the file.<\/strong><\/p>\n<p>You now will see a Forbidden message on accessing a directory that do not include an index file.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to Disable Directory Listing? You may want to hide directory listings because by default Webservers look for an index file under every directory and if not found, they list the files and directories under it on browsing the directory.<br \/>\nTo disable Directory Listing for an account recursively:<br \/>\n1) Create a .htaccess file under the directory<br \/>\nvi .htaccess<br \/>\n2) Add Options directive as follows:<br \/>\nOptions -Indexes<br \/>\n3) Save the file.<br \/>\nYou now will see a Forbidden message on accessing a directory that do not include an index file.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[472,471,468,469,470],"_links":{"self":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/362"}],"collection":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/comments?post=362"}],"version-history":[{"count":3,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/362\/revisions"}],"predecessor-version":[{"id":364,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/362\/revisions\/364"}],"wp:attachment":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/media?parent=362"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/categories?post=362"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/tags?post=362"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}