Skip to main content

Lock WordPress login

Comments

6 comments

  • quizknows
    Your "order" directive is wrong. set it to deny,allow since that is the order you made the actual rules, or change the rules to match your order directive (if it is set to allow,deny then you need the allow rule(s) on top of the deny rules). You also should not need the saitisfy all line. You may also have to specify a 401 errordocument, and perhaps a different directive for the 403 too such as: errordocument 403 default errordocument 401 default You could also consider using filesmatch instead of 'files'
    0
  • ahead
    thanks but no luck. If I change from 'Order allow,deny' to 'Order deny,allow' when I visit the sites I get a '500 Internal Server Error ' instead of the homepage. If I leave as it is and put allow from xxx.xxx.xxx.xxx at the top, I get the 500 error again.
    0
  • quizknows
    Check your apache error log; it should tell you why the 500 is happening. All you need is this:
    order deny,allow deny from all allow from xxx.xxx.xxx.xxx
    0
  • ahead
    didn't work but thanks, eventually I got it working with: Order allow,deny allow from xxx.xxx.xxx.xxx When using allow,deny, no deny is needed as it is a whitelist.
    0
  • quizknows
    I tested the exact block of code I posted in a /home/.htaccess file to ensure it works. Regardless, glad you found something that worked for you.
    0
  • cPanelMichael
    Hello :) I'm happy to see you were able to find a working entry. Thank you for updating us with the outcome.
    0

Please sign in to leave a comment.