Multisite Blog Alias

WP Multisite plugin to maintain URL-redirects for Blogs.

Features

  • Permanent 301 Redirect to blogs main domain
  • Painless installation and activation – no file access necessary.
  • Checks domain status
  • Supports UTF-8 Domains
  • WP-Cli commands

Usage

  1. Set up your DNS. Make sure your Domain points to your WordPress installation. You can achieve this by either setting up an A- or CNAME-Record in your DNS configuration. Your webserver must be configured to handle requests on the given Domain.
  2. Under Network Admin – Sites edit the site and select the Alias Domains Tab.
  3. Enter the domain without http ao / and click “Add”.
  4. Click “Check Status” to see if it worked. If something went wrong you will see an error message.

If you want to redirect with URL path appended (e.g. from some-alias.tld/some/path to some-real-blog.tld/some/path), add this to your wp-config.php:

Status messages

Warning: The domain matches the site URL of this blog: The Blog is using the domain name as Site URL.

Error: The domain is already used by another site: A different Blog is already using the domain as Site URL. Eiter Remove the alias from the sblog you are currently workin on, or from the other one.

The domain is unreachable: There is likely an error in your DNS or your Webserver configuration. Use nslookup from he command line or whatsmydns.net to check the DNS-Settings.

The domain or a redirect does not point to this blog: Following all redirects did not end up on your WordPress-Site, but somewhere else. There is likely an error in your DNS or your Webserver configuration.

WP-CLI Examples

Listing Domain aliases

List alias domains for blog-id 123

Output minified json of all aliases

Output csv including the header row but omitting other messages into file

Add Domain Alias

Remove Domain Alias

Remove a specific alias

Remove all aliases for blog 123

Testing Domain Aliases

The plugin introduces two functions allowing you to add / remove a domain aliases from inside PHP.

Add Domain alias

Remove specific Domain alias

Remove Domain aliases for a specific blog

Please head over to the source code on Github.

0

评论0

 
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
显示验证码
没有账号?注册  忘记密码?

社交账号快速登录