Redirect or restrict access to a directory with .htaccess
A very important action is the restriction of the administration directory of our website such as: wp-admin in WordPress, administrator in Joomla and other directories or subdirectories that could compromise the stability or security of our website.
To avoid unauthorized access to a directory or subdirectory of our website, we simply create a .htaccess file with the following instruction, substituting the local IP address and publishing for ours, we can also redirect the not allowed access to a specific URL. Once created we upload it to the root directory from which we want to prevent access.
RewriteEngine on
Options +FollowSymlinks
#Redirect
ErrorDocument 403 https://midominio.com/
order deny,allow
deny from all
allow from Public IP
allow from local IP
If you have any questions, please feel free to contact Picaraza Domains support team 24/7/365.