this is what i coded in the .htaccess file for my ip but it is not working any ideas for improvement?? Options -Indexes AuthType Basic AuthName "restricted area" AuthUserFile /data/13/1/150/135/1313461/user/1406792/htdocs/employeesatisfy/.access.pwd AuthPam_Enabled off Require valid-user Order allow,deny Allow from 69.245.249.165 Satisfy Any
How about adding this code: RewriteEngine On RewriteRule %{REMOTE_ADDR} !^69\.245\.249\.165 - [C] Code (markup):
I added the 2 lines to the bottom and got this Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [no address given] and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log.
error log = [Tue Nov 11 18:49:27 2008][alert] [client 205.178.182.165] /data/13/1/150/135/1313461/user/1406792/htdocs/employeesatisfy/.htaccess: RewriteCond: bad flag delimiters
Sorry mixed something up. Now i understand what you want. I sorted out your code: Options -Indexes AuthName "restricted area" AuthType Basic AuthUserFile /data/13/1/150/135/1313461/user/1406792/htdocs/employeesatisfy/.access.pwd Require valid-user AuthPam_Enabled off order deny,allow allow from 69.245.249.165 deny from all Satisfy Any Code (markup): You had it right, only the deny from all at the end was missing. I'm not sure if AuthPam_Enabled off is really needed... But Satisfy Any will bypass the passwordcheck from the ip 69.245.249.165
Please, tell me whether this solution is working as I need to do almost the same... All users need a password to log in, except from one IP address.