-
htaccess to allow for more then one address without asking for Authentication
over 9 years ago
over 9 years ago
Suppose we are working on a project in a local area network where all developer have same IP Address. then most of times its a requirement that project must be accessed directly without authentication.
But at the same case if any one trying to access the project from outside of LAN, It must prompt for enter the password.
In this code, We are allowing more then one IP Address for which it will directly access not required authentication.
- Order deny,allow
- Deny from all
- Allow from "112.xxx.x.xxx|113.xxx.x.xxx|113.xxx.x.xxx"
- AuthType Basic
- AuthUserFile /opt/.htpasswd
- AuthName "Protected Area"
- require valid-user
- Allow from "112.xxx.x.xxx|113.xxx.x.xxx|113.xxx.x.xxx"
- Satisfy Any
Order deny,allow Deny from all Allow from "112.xxx.x.xxx|113.xxx.x.xxx|113.xxx.x.xxx" AuthType Basic AuthUserFile /opt/.htpasswd AuthName "Protected Area" require valid-user Allow from "112.xxx.x.xxx|113.xxx.x.xxx|113.xxx.x.xxx" Satisfy Any
Can you help out the community by solving one of the following Networking problems?
Do activity (Answer, Blog) > Earn Rep Points > Improve Rank > Get more opportunities to work and get paid!
For more topics, questions and answers, please visit the Tech Q&A page.
0 Comment(s)