Job Brown
Job Brown

Reputation: 166

Allowing access with .htaccess (by address AND auth)

I have the following, but its not working correctly.

I run this server locally, but have now configured for external access. I want it to work such that if you're not within my internal network, you must authenticate.

Authentication works, however cannot get httpd to accept this code so something must be wrong. Just can't figure out which!

Order Deny, Allow
Deny from all    
Satisfy Any

Allow from 127.0.0.1
Allow from 192.168

AuthUserFile "C:/Program Files/wamp/htpasswd.txt"
AuthName "Piss off :-)" 
AuthType Basic 

Require valid-user

Upvotes: 0

Views: 245

Answers (1)

David Wolever
David Wolever

Reputation: 154484

Swap the Order:

Order Allow,Deny

Upvotes: 1

Related Questions