GetSimple Support Forum

Full Version: Restricting access to admin through .htaccess
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Code:
order allow,deny
allow from [IP ADDRESS]
deny from all
Is this possible? Would adding an .htaccess to the admin folder screw anything up? I have done it with Wordpress in the past. Basically only allowing access to the admin panel from my home IP address.
allow for IP adress is only helpful if you have a fixed IP adress and will never Wink

did you test it with GetSimple? That would be the easiest way to find out if it works
I cannot test it, I have no fix IP to access the net
Seems to work, I dropped an .htaccess into the admin directory and added this code:
Code:
AuthUserFile /dev/null
AuthGroupFile /dev/null
AuthName "Example Access Control"
AuthType Basic
<LIMIT GET>
order deny,allow
deny from all
allow from [insert IP Address]
</LIMIT>
I tried accessing it from my iphone and all I got was a "oops page not found" error, whereas, my pc was still able to access the directory. Of course, your IP address must be static and not dynamic. Also, I know I could change the name of the admin folder in the gsconfig.php file, however, this is a much better measure against someone brute forcing the admin login.