Answer the question
In order to leave comments, you need to log in
How to implement password access through .htaccess, taking into account the ip address?
There is a task: to implement password authorization through .htaccess , but on the condition that authorization from a certain IP will not be required. I found this solution, but the server returns a 500 error:
<If %{REMOTE_ADDR} != '127.0.0.1'>
AuthType Basic
AuthName "Password Protected Area"
AuthUserFile /home/user/www/site.ru/.htpasswd
Require valid-user
</If>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question