[wordpress插件] Domainer领域者

wordpress 插件 文章 2020-04-21 02:41 0 237 全屏看文

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


That’s it.


Domain Options


Each domain has 4 options you set:


    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.


    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.


    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' );


    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>

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