{"id":53011,"date":"2011-07-29T08:00:00","date_gmt":"2011-07-29T08:00:00","guid":{"rendered":"https:\/\/www.weixiaoduo.com\/plugins\/2024\/02\/22\/disable-directory-listings\/"},"modified":"2011-07-29T12:37:00","modified_gmt":"2011-07-29T12:37:00","slug":"disable-directory-listings","status":"publish","type":"post","link":"https:\/\/www.weixiaoduo.com\/plugins\/disable-directory-listings\/","title":{"rendered":"Disable Directory Listings"},"content":{"rendered":"<p>Prevent virtual directory listing services from listing the contents of directories, and\/or show a page in place of a directory\u2019s listing.<\/p>\n<p>The Apache web server can be configured to automatically display the listings of the contents of a web site\u2019s file directory if no index file (i.e. index.html or index.php) is present.  This can expose files and information to visitors.  Of course the web server could be configured to not do this (the recommended approach), but sometimes you don\u2019t have permission (you\u2019re on a shared host), the know-how, or you want to selectively disallow virtual directory listings.  That\u2019s where this plugin can help.<\/p>\n<p>If you want to test if your site has virtual directory listings enabled, try visiting http:\/\/www.YOURSITE.com\/wp-includes (obviously, change the domain to match your own).  If you see a listing of PHP files then virtual directory listing is enabled for your site.<\/p>\n<p>This plugin can prevent visitors from seeing the contents of certain (or all) directories on your site (assuming your web server generates virtual directory listings).  It also allows you to use a WordPress page as the index for a directory<\/p>\n<p>By default, the following directories are protected:<\/p>\n<ul>\n<li>wp-includes\/<\/li>\n<li>wp-content\/<\/li>\n<li>wp-content\/plugins\/<\/li>\n<li>wp-content\/themes\/<\/li>\n<\/ul>\n<p>It does NOT protect any other directory by default.  You can change this via the plugin\u2019s admin settings page.<\/p>\n<p>TIP: When this plugin is activated (and more specifically, ater the permalink structure is updated as per the instructions below), WordPress will generate the themed 404 \u2013 Not Found page.  If you were to create a Page with the same name as one of the directories being disabled (i.e. \u2018wp-includes\u2019 or \u2018wp-content\u2019) then that page will be displayed instead of the 404 error message.  If you want to display a page for the \u2018plugins\u2019 and \u2018themes\u2019 directory, you must create them as children pages of a \u2018wp-content\u2019 page.<\/p>\n<p>NOTE: This plugin only works for the Apache web server.<\/p>\n<p>Links: <a href=\"http:\/\/coffee2code.com\/wp-plugins\/disable-directory-listings\/\" rel=\"nofollow ugc\">Plugin Homepage<\/a> | <a href=\"http:\/\/coffee2code.com\" rel=\"nofollow ugc\">Author Homepage<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Prevent virtual directory listing services from listing the contents of directories, and\/or show a page in place of a directory's listing.<\/p>\n","protected":false},"author":65,"featured_media":262316,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"slim_seo":{"title":"Disable Directory Listings - \u8587\u6653\u6735\u63d2\u4ef6\u76ee\u5f55","description":"Prevent virtual directory listing services from listing the contents of directories, and\/or show a page in place of a directory's listing."},"footnotes":""},"categories":[1],"tags":[3957,2605,17473,5126,182],"class_list":["post-53011","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-apache","tag-coffee2code","tag-directory-listings","tag-privacy","tag-security"],"_links":{"self":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts\/53011","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/users\/65"}],"replies":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/comments?post=53011"}],"version-history":[{"count":0,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts\/53011\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/media\/262316"}],"wp:attachment":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/media?parent=53011"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/categories?post=53011"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/tags?post=53011"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}