Solution:
- The below code will prevent browser access to any file in these directories other than “a.b.c.d” which you should change to be your static IP address.
–
order deny,allow
allow from a.b.c.d # This is your static IP
deny from all
- OR restrict the directory with a password:
–
AuthUserFile /etc/httpd/htpasswd
AuthType Basic
AuthName "restricted"
Order Deny,Allow
Deny from all
Require valid-user
Satisfy any
- Or you can protect it with a .htaccess fileĀ http://www.askapache.com/wordpress/htaccess-password-protect.html
- To answer you question as a apache URL layout configuration via mod_rewrite (the apache module that handles URL rewriting), this could be helpful:
RewriteRule ^admin/(.*)$ /wp-admin/$1 [QSA,L]