[wordpress插件] Domainer领域者

wordpress 插件 文章 2020-04-21 02:41 0 37 全屏看文
评分
100
描述

Domainer lets you route custom domain names to specific sites on your Multisite installation.

Domainer使您可以将自定义域名路由到多站点安装中的特定站点。

That’s it.

就是这样。

Domain Options

域选项

Each domain has 4 options you set:

每个域都设置了4个选项:

    1. The target site;

    2. 目标站点;

      pick from a list of existing sites on your network.

    3. 从网络上现有站点的列表中选择。

    4. A type, choose from one of 3 flavours:

    5. 一种类型,从以下三种口味中选择一种:

        • Primary: sites with a primary domain will have their URLs redirected to them.
        • 主要:具有主要域的网站会将其网址重定向到他们。

        • Redirect: these domains will always redirect to the primary domain, or the original failing that.
        • 重定向:这些域将始终重定向到主域,否则将重定向到原始域。

        • Alias: these won’t redirect to the primary, so they’re bad for SEO but can be useful for certain setups.
        • 别名:这些不会重定向到主别名,因此它们对SEO不利,但对某些设置很有用。

      • A www rule, choose from one of 3 options:

      • www规则,请从以下三个选项之一中进行选择:

          • Always: always redirect to the domain with www at the front.
          • 始终:始终重定向到前面带有www的域。

          • Never: always redirect to the domain without www at the front.
          • 从不:始终重定向到没有www开头的域。

          • Auto: allow the domain to function with or without www, usually bad for SEO.
          • 自动:允许域在带有或不带有www的情况下正常运行,通常对SEO不利。

    Content Rewriting

    内容重写

    In order to reduce redirects while navigating the site, Domainer will replaced all instances of the site’s original domain name on the pages to that of the primary domain, or currently requested alias domain.

    为了减少在浏览网站时的重定向,Domainer会将页面上网站原始域名的所有实例替换为主要域名或当前请求的别名域名。

    This will not affect email addresses however;

    但是,这不会影响电子邮件地址;

    any filters on the content will only replace instances starting with a double slash so as to match URLs.

    内容上的所有过滤器都只会替换以双斜杠开头的实例,以匹配URL。

    If you find instances of the domain not being replaced, such as in content filtered by 3rd party plugins, you can patch it with this function:

    如果您发现该域的实例未被替换,例如在由第三方插件过滤的内容中,则可以使用以下功能对其进行修补:

    add_filter( 'my_filter', 'domainer_rewrite_url' );

      add_filter('my_filter','domainer_rewrite_url');

    The function can also take a domain or array of domains to replace, as well as a specific domain to replace with.

    该函数还可以使用一个域或一组域来替换,以及要替换的特定域。

安装步骤

    1. Upload the contents of domainer.tar.gz to your /wp-content/plugins/ directory.
    2. domainer.tar.gz 的内容上传到您的 / wp-content / plugins / 目录。

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

    5. Assuming the system is unable to take care of it automatically:

    6. 假设系统无法自动处理:

        1. Copy the sunrise.php file to /wp-content/.
        2. 将Sunrise.php文件复制到 / wp-content /

        3. Add define('SUNRISE', true); to your wp-config.php file, anywhere above the ABSPATH line.<

        4. define('SUNRISE',true); 添加到 wp-config.php 文件中的 ABSPATH 行上方的任意位置。

          /li>

          / li>

      1. Start adding domains under Network Admin > Domains.
      2. 开始在“网络管理员”>“域”下添加域。

下载地址
https://downloads.wordpress.org/plugin/domainer.1.2.0.zip
-EOF-