wp-admin redirection and Apache DirectoryMatch rules
-
I would like to restrict access to my /wp-admin folder so that I can ONLY access it from within my home network via its private, internal ip:
[http]://192.168.1.2/wordpress/wp-admin
and anybody accessing it via its public ip gets blocked.My rules are:
<DirectoryMatch /wordpress/wp-admin> Order Deny,Allow Deny from all Allow from 192.168.1.3 Allow from 192.168.1.4 </DirectoryMatch>
I have the same rule set for myphpadmin and it works as expected. But for wp-admin, wordpress automatically redirects the request to its public ip. So even when I type
[http]://192.168.1.2/wordpress/wp-admin
in my browser, wordpress automatically redirects to its public ip:
[http]://my.public.ip.addr/wordpress/wp-login.php?redirect_to=https://192.168.1.2/wordpress/wp-admin/&reauth=1
therefore the wp-admin directory is still inaccessible even from within my internal network. Is there a way to stop this redirection so I can access the wp-admin directly from its private ip?
- The topic ‘wp-admin redirection and Apache DirectoryMatch rules’ is closed to new replies.