[wordpress插件] Canonical Attachments规范附件

wordpress 插件 文章 2020-03-16 11:50 669 0 全屏看文

AI助手支持GPT4.0

评分
100
描述

This plugin was developed to allow canonical tags as response headers to be created via htaccess for attachment files such as pdfs and docs.

开发此插件是为了允许通过htaccess为附件(例如pdf和docs)创建规范标签作为响应标头。

The plugin:

插件:

    • Generates an htaccess file to manage the wp-content/uploads directory where these files are being uploaded
    • 生成htaccess文件以管理将这些文件上传到的wp-content / uploads目录

    • Updates the htaccess file with canonical tags which are delivered via a header when the attachment is called
    • 使用规范标签更新htaccess文件,该规范标签在调用附件时通过标头提供

    • Creates a dashboard where you can easily filter and find attachments without canonicals or that are not attached to a post.
    • 创建一个仪表板,您可以在其中轻松过滤和查找没有规范的附件或未附加到帖子的附件。

    • Creates a dashboard where you can easily attach a file to its parent post (one at a time or in bulk) or manually addemove a canonical tag for a file
    • 创建一个仪表板,您可以在其中轻松地将文件附加到其父帖子(一次或批量),也可以手动添加/删除文件的规范标签

    • Allows you to add a canonical url from the media file in the library or when you upload
    • 允许您从库中的媒体文件中或上载时添加规范的URL

    • Creates a dashboard to edit the .htacess file directly for the uploads directory in case there are additional files in the directory that were uploaded outside of wordpress (e.g. during a site migration)
    • 如果在目录中还有其他文件是在wordpress之外上传的(例如在网站迁移期间),则创建一个仪表板以直接为上载目录编辑.htacess文件。

    The challenge: Analytics software such as Google Analytics, cannot track a user that enters a website via a pdf file in Google search results.

    挑战:诸如Google Analytics(分析)之类的Analytics软件无法跟踪在Google搜索结果中通过pdf文件进入网站的用户。

    Files cannot have a standard canonical tag added in the and instead the canonical tag has to be added via an http header when the file is requested from the server.

    文件不能在中添加标准规范标签,而当从服务器请求文件时,必须通过http标头添加规范标签。

    In order to accomplish this, we need to have an htaccess file listening for a request to that file, and then sending the header.

    为此,我们需要一个htaccess文件来监听对该文件的请求,然后发送标头。

    Expected outcome: PDF files and other attachments will be replaced in search results with the post or page counterparts, and we will be able to measure the traffic to those pages and provide calls to action for downloading

    预期结果::搜索结果中的PDF文件和其他附件将替换为帖子或页面的对应内容,我们将能够衡量这些页面的访问量并提供号召性用语进行下载

    the file, submitting contact forms, etc. Note: Canonical tags do not force a search engine to index one url vs. another, but act as a guidelineequest to the search engine.

    文件,提交联系表格等。注意:规范标签不会强制搜索引擎索引一个url与另一个URL的索引,而是充当对搜索引擎的指南/请求。

    As long as the attachment content is similar to the canonical URL, you should have no problem encouraging the search engines to choose the correct version.

    只要附件内容与规范URL相似,就可以鼓励搜索引擎选择正确的版本。

    Future Features and Development

    未来的功能和发展

    Based on the feedback, we hope to continue developing additional features to support user requests.

    根据反馈,我们希望继续开发其他功能来支持用户请求。

    Current future feature ideas include:

    当前未来的功能构想包括:

      • Automatic canonicalization of non-image files to attached post
      • 将非图像文件自动规范化为附加帖子

      • Integration with non-apache servers
      • 与非Apache服务器集成

      • Canonical builder for non-wordpress media files
      • 非wordpress媒体文件的规范生成器

      • Option to bulk delete canonical associations and delete htaccess on uninstall
      • 用于批量删除规范关联并在卸载时删除htaccess的选项

安装步骤

This section describes how to install the plugin and get it working.

本节介绍如何安装插件并使其正常工作。

    1. Search for “Canonical Attachments” from the Add Plugins page and click install
    2. 从“添加插件”页面中搜索“规范附件”,然后单击“安装”

    3. Alternatively: Upload canonical-attachements.zip to the /wp-content/plugins/ directory
    4. 或者:将 canonical-attachements.zip 上传到 / wp-content / plugins / 目录

    5. Activate the plugin through the ‘Plugins’ menu in WordPress
    6. 通过WordPress中的“插件”菜单激活插件

    7. Enjoy!
    8. 享受!

下载地址
https://downloads.wordpress.org/plugin/canonical-attachments.zip
-EOF-

AI助手支持GPT4.0