3

I have a multisite installation and use an .htaccess directive to close access to wp-login.php.

<files wp-login.php>
errordocument 403 http://example.com/restricted/
order deny,allow
deny from all
</files>

Is there a way that I can allow access to a specific individual site using another directive?

I don't know how multisite generates those URLs, as I don't see an obvious rewrite rule.

1
  • So you want to restrict access to ./wp-login.php for all sites except for one in particular, correct? Are you using a subdirecory or a subdomain installation? Is the site that is to be permitted access the main site, or a sub-site?
    – bosco
    Sep 12 '15 at 2:10
0

If you want to provide restricted access, you should add an additional string with the /wp-login.php URL. For example:

http://example.com/wp-login.php?restricted_site_access=key_string

If the URL does not have such a string parameter, then you can redirect them to a 404 page; you don't need to rewrite the .htaccess file for it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.