Say I've got a htaccess file shared by "dev.server" and "server.site.com".
The very first domain should allow all customers to gain access to it unchallenged (it only is available on my small local development server).
The 2nd domain I wish to authenticate customers with Apache (NOT by database).
The code to authenticate customers is:
AuthType Basic AuthName "Server Admin" AuthUserFile "/path/to/passwd" require valid-user
Things I can't do is make individuals 4 lines only matter when the domain is "server.site.com". How do i do that?
I looked for something similar to
<IfEnv HTTP_HOST "site.server.com"> but didn't have luck.
This seems to operate, still have to do some testing onto it though.
Order Deny,Allow Deny from all SetEnvIf Host domain.for.no.auth dev Allow from env=dev AuthUserFile .pwd AuthType Basic AuthName MySite Require valid-user Satisfy Any
You would need to define it in 2 separate files, or directly within the server's configuration within the