[wordpress插件] Domain Sharding域分片

wordpress 插件 文章 2020-04-21 02:10 0 45 全屏看文
评分
80
描述

We need to determine the subdomain pattern (ex: http://cdn-#.domain.tld ) substitution and the maximum number of subdomains we want to work with (ex: 5).

我们需要确定子域模式(例如:http://cdn-#.domain.tld)的替换以及要使用的子域的最大数量(例如5个)。

The pattern will transform an url like this 'http://www.domain.tld/img/source1.jpg' to this new url structure 'http://cdn-X.domain.tld/img/source1.

该模式会将类似“ http://www.domain.tld/img/source1.jpg”的URL转换为此新的URL结构“ http://cdn-X.domain.tld/img/source1”。

jpg' where X ranges from 1 to 5 (max).

jpg”,其中X的范围是1到5(最大)。

NOTE: If you have trouble accessing images using the new address because WordPress asks you to register the domain then you must insert the following line in the file wp-config.php

注意:如果由于WordPress要求您注册域而导致无法使用新地址访问图像,则必须在文件wp-config.php中插入以下行

include_once(ABSPATH.'wp-content/plugins/domain-sharding/domain-sharding-alias.php');

  include_once(ABSPATH.'wp-content / plugins / domain-sharding / domain-sharding-alias.php');

Then you need to be sure to set write permissions to the aliases folder located within the plugin directory.

然后,您需要确保对位于插件目录中的aliases文件夹设置写权限。

NOTE: You’ll need to manually create the new A records for the subdomains in your DNS panel.

注意:您需要在DNS面板中为子域手动创建新的A记录。

They should have the same ip address of your main domain.

它们应该与您的主域具有相同的IP地址。

Visit the Seocom website for more information about SEO or WPO optimization

访问 Seocom网站,以获取有关SEO或WPO优化的更多信息

安装步骤

    1. Install “Domain Sharding” either via the WordPress.org plugin directory, or by uploading the files to your server inside the wp-content/plugins folder of your WordPress installation.
    2. 通过WordPress.org插件目录或将文件上传到WordPress安装的wp-content / plugins文件夹中的服务器上,以安装“域分片”。

    3. Activate “Domain Sharding” plugin via WordPress Settings.
    4. 通过WordPress设置激活“域分片”插件。

    5. It’s done.

    6. 完成了。

      Easy, isn’t it?

    7. 很简单,不是吗?

    NOTE: If you have trouble accessing images using the new address because WordPress asks you to register the domain then you must insert the following line in the file wp-config.php

    注意:如果由于WordPress要求您注册域而导致无法使用新地址访问图像,则必须在文件wp-config.php中插入以下行

    include_once(ABSPATH.'wp-content/plugins/domain-sharding/domain-sharding-alias.php');

      include_once(ABSPATH.'wp-content / plugins / domain-sharding / domain-sharding-alias.php');

    NOTE: You’ll need to manually create the new A records for the subdomains in your DNS panel.

    注意:您需要在DNS面板中为子域手动创建新的A记录。

    They should have the same ip address of your main domain.

    它们应该与您的主域具有相同的IP地址。

下载地址
https://downloads.wordpress.org/plugin/domain-sharding.zip
-EOF-