How to block regular users from getting to my admin page.

Avatar
  • Answered
My admin control panel is
http://23.235.195.101/admin/users/login
I don't want any regular users from the internet guess this admin url and try to messup my site.
Is there a way I can block those regular users and only aloow me and my other administrators on this admin url link? Like any permissions/firewall rule I can setup? Now any one can access this link from the internet.
Please help.
Thanks.


Avatar
JacobIMH
Hello, Yes there are couple ways that you can limit access to your admin page. You could either restrict access to the /admin folder by your IP address by adding this to your .htaccess file:
RewriteEngine on
RewriteCond %{REQUEST_URI} ^/admin
RewriteCond %{REMOTE_ADDR} !^123\.123\.123\.123$
RewriteRule .* - [F,L]
Or you could password protect your directory. Please let us know if you had any further questions at all. - Jacob