[wordpress插件] Disable Directory Listings禁用目录列表

wordpress 插件 文章 2020-04-17 22:00 480 0 全屏看文

AI助手支持GPT4.0

评分
100
描述

Prevent virtual directory listing services from listing the contents of directories, and/or show a page in place of a directory’s listing.

防止虚拟目录列表服务列出目录内容,和/或在页面列表中显示页面。

The Apache web server can be configured to automatically display the listings of the contents of a web site’s file directory if no index file (i.e. index.html or index.php) is present.

如果没有索引文件(即index.html或index.php),则可以将Apache Web服务器配置为自动显示网站文件目录内容的列表。

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't have permission (you're on a shared host), the know-how, or you want to selectively disallow virtual directory listings

当然,可以将Web服务器配置为不执行此操作(建议的方法),但是有时您没有权限(您在共享主机上),专有技术,或者想要有选择地禁止虚拟目录列表

.

That’s where this plugin can help.

这就是该插件可以提供帮助的地方。

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).

如果要测试您的站点是否启用了虚拟目录列表,请尝试访问http://www.YOURSITE.com/wp-includes(显然,请更改域以匹配您自己的域)。

If you see a listing of PHP files then virtual directory listing is enabled for your site.

如果您看到PHP文件列表,则为您的站点启用了虚拟目录列表。

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).

此插件可以阻止访问者看到您网站上某些(或全部)目录的内容(假设您的Web服务器生成虚拟目录列表)。

It also allows you to use a WordPress page as the index for a directory

它还允许您使用WordPress页面作为目录的索引

By default, the following directories are protected:

默认情况下,以下目录受保护:

    • wp-includes/
    • wp-includes /

    • wp-content/
    • wp-content /

    • wp-content/plugins/
    • wp-content / plugins /

    • wp-content/themes/
    • wp-content / themes /

    It does NOT protect any other directory by default.

    默认情况下,它不保护任何其他目录。

    You can change this via the plugin’s admin settings page.

    您可以通过插件的管理员设置页面更改此设置。

    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 – Not Found page.

    提示:激活此插件后(更具体地说,按照下面的说明更新永久链接结构),WordPress将生成主题404 –未找到页面。

    If you were to create a Page with the same name as one of the directories being disabled (i.e. ‘wp-includes’ or ‘wp-content’) then that page will be displayed instead of the 404 error message.

    如果您要创建一个与被禁用的目录之一(即“ wp-includes”或“ wp-content”)同名的页面,则会显示该页面,而不是404错误消息。

    If you want to display a page for the ‘plugins’ and ‘themes’ directory, you must create them as children pages of a ‘wp-content’ page.

    如果要显示“插件”和“主题”目录的页面,则必须将它们创建为“ wp-content”页面的子页面。

    NOTE: This plugin only works for the Apache web server.

    注意:此插件仅适用于Apache Web服务器。

    Links: Plugin Homepage |

    链接:插件主页 |

    Author Homepage

    作者主页

安装步骤

    1. Unzip disable-directory-listings.zip inside the /wp-content/plugins/ directory for your site (or install via the built-in WordPress plugin installer)

      在您网站的 / wp-content / plugins / 目录内

    2. 解压 disable-directory-listings.zip (或通过内置的WordPress插件安装程序安装)

    3. Activate the plugin through the ‘Plugins’ admin menu in WordPress
    4. 通过WordPress中的“插件”管理菜单激活插件

    5. Go to Settings -> Directory Listings admin options page.

    6. 转到设置-> 目录列表管理选项页面。

      Optionally customize the list of directories.

    7. (可选)自定义目录列表。

    8. If the plugin’s admin options page says that your .htaccess file is not writable, then you must manually update your .htaccess file with the changes it has made.

    9. 如果插件的管理选项页面上说您的.htaccess文件不可写,那么您必须使用所做的更改手动更新.htaccess文件。

      Go to the Settings -> Directory Listings admin options page and follow the instructions to update your .htaccess.

    10. 转到设置-> 目录列表管理选项页面,然后按照说明更新您的.htaccess。

    Note: If your .htaccess is not writable, then you must perform step 4 when activating or deactivating the plugin, and when updating the plugin’s options.

    注意:如果您的.htaccess文件不可写,那么在激活或停用插件以及更新插件的选项时,您必须执行第4步。

    Otherwise, step 4 is not necessary.

    否则,就不需要步骤4。

下载地址
https://downloads.wordpress.org/plugin/disable-directory-listings.2.0.zip
-EOF-

AI助手支持GPT4.0