If we try to access a non-existant Multisite site, e.g., http://site1.example.com
or http://example.com/site1/
, we are redirected to http://example.com/wp-signup.php?new=site1
.
How to block this and redirect the browser to another page?
If we try to access a non-existant Multisite site, e.g., http://site1.example.com
or http://example.com/site1/
, we are redirected to http://example.com/wp-signup.php?new=site1
.
How to block this and redirect the browser to another page?
You must be logged in to post a comment.
[Update]
An alternative (maybe better) is to use the following constant in
wp-config.php
:At the very beginning of
wp-signup.php
file there is this code:So, it’s just a matter of adding the
signup_header
action hook to break any further execution and redirect the browser to other URL.Here, wrapped as a Must Use Plugin:
I found a solution in this article
I had the wrong
SUBDOMAIN_INSTALL
setting value in my config file.Simply add the following to
wp-content/mu-plugins/disable-signups.php
:The signup page will now say: