vbatra Posted June 15, 2015 Share Posted June 15, 2015 Is there any way to restrict the login to admin panel to specified (white listed) IP addresses only? I know I can do it from .htaccess but it would give and error rather than a message. I would like to show a login failed message when someone tries to log in outside of white listed IP addresses. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted June 15, 2015 Share Posted June 15, 2015 htaccess would be the correct way to do it, but if you want to redirect to a custom failed login page, you would need to add a 403 redirect... something along the lines of... order deny,allow deny from all allow from xx.xx.xx.xx ErrorDocument 403 /failedlogin.php if all you want is a very simple message rather than the default output, you could add the text directly to the htaccess file - it can include html... but if you wanted to do that, it's probably easier to redirect to a page as shown above. ErrorDocument 403 "get out - you are not supposed to be here!" 0 Quote Link to comment Share on other sites More sharing options...
vbatra Posted June 15, 2015 Author Share Posted June 15, 2015 to be more specific I would like to restrict only staff members and not full admin from logging outside while listed IP addresses. Is this possible? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted June 16, 2015 Share Posted June 16, 2015 if the full admin and staff members don't use the same IP, then you could just add any unique IPs the full admin will use, plus any IPs for shared places, e.g the office, where both admin and staff will need to login. you wouldn't be able to use a WHMCS admin level within htaccess to determine login access... perhaps possible with an action hook, but i'm not sure. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.