KyleJ144 Posted March 6, 2018 Share Posted March 6, 2018 Hey, I am trying to only allow my IP Address to use the admin area and i want an error message to pop up if the IP Address is not listed or event for them to be redirected to my official hosting website home page and when i change this then the admin area just messes up. Any help for the above will be greatly appreciated Thanks in advance Link to comment Share on other sites More sharing options...
brian! Posted March 6, 2018 Share Posted March 6, 2018 2 hours ago, KyleJ144 said: I am trying to only allow my IP Address to use the admin area and i want an error message to pop up if the IP Address is not listed or event for them to be redirected to my official hosting website home page and when i change this then the admin area just messes up. .htaccess inside your admin folder would be the simplest way (if you don't need an error message) - you can block/whitelist IPs and/or add additional username/password options. https://docs.whmcs.com/Further_Security_Steps#Restrict_Access_by_IP Link to comment Share on other sites More sharing options...
KyleJ144 Posted March 6, 2018 Author Share Posted March 6, 2018 2 hours ago, brian! said: .htaccess inside your admin folder would be the simplest way (if you don't need an error message) - you can block/whitelist IPs and/or add additional username/password options. https://docs.whmcs.com/Further_Security_Steps#Restrict_Access_by_IP Okay, Thank you and how do your add an error message or redirect users away from the admin panel if their IP Address is not listed. Link to comment Share on other sites More sharing options...
twhiting9275 Posted March 6, 2018 Share Posted March 6, 2018 Add this to the top, of .htaccess, before the limit rules ErrorDocument 403 /index.php This will take people directly back to your index page. Want them directed elsewhere, then change that to be where you want them to go Link to comment Share on other sites More sharing options...
KyleJ144 Posted March 6, 2018 Author Share Posted March 6, 2018 1 hour ago, twhiting9275 said: Add this to the top, of .htaccess, before the limit rules ErrorDocument 403 /index.php This will take people directly back to your index page. Want them directed elsewhere, then change that to be where you want them to go I have tested it but it does not come up with the error and redirect. I have supplied a screenshot of the way the admin area turns out Link to comment Share on other sites More sharing options...
twhiting9275 Posted March 6, 2018 Share Posted March 6, 2018 You'll need to edit that line to point to where you want the user to go. That will work, however, when used properly. I use it all the time Link to comment Share on other sites More sharing options...
KyleJ144 Posted March 6, 2018 Author Share Posted March 6, 2018 but i want the user to be redirected here 403 /index.php Link to comment Share on other sites More sharing options...
twhiting9275 Posted March 6, 2018 Share Posted March 6, 2018 Try using https://www.domain.com/whmcs/index.php instead of just /index.php Of course, adjust your own settings as needed. Link to comment Share on other sites More sharing options...
Recommended Posts