Skip to main content

Disable access to compromised website

Comments

3 comments

  • rpvw
    You could try this in the .htaccess file for the directory that you are trying to protect
    Require ip x.x.x.x y.y.y.y z.z.z.z
    Add as many IPs separated by a space that you want to allow - the rule has to validate to any one of the IPs to let you in, anything else will be blocked See mod_authz_core - Apache HTTP Server Version 2.4 for more information
    0
  • danielpmc
    Hello euro-space, I am currently using this in my cPanels public_html .htaccess. This blocks all traffic except my IP. I have used this on and off for years as i build or test sites. Order Deny,Allow Deny from all Allow from xxx.xxx.xxx.xxx Replace xxx.xxx.xxx.xxx with your IP. (Also if you need to allow others to access you can add as many Allow from xxx.xxx.xxx.xxx as needed.) Hope this helps you out.
    0
  • cPanelMichael
    Hello @euro-space, The previous posts should help. Let us know if you have any questions. Thank you.
    0

Please sign in to leave a comment.