I have a development site that, for an additional layer of protection to keep preying eyes away, I have behind a htpasswd file. However, I'm getting tired of typing in the username and password when I'm running test on the server. So I thought it would be cool if I could check to see if the REMOTE_ADDR = the Server's IP, to skip those lines in the htaccess file by doing the following
RewriteEngine on
RewriteCond %{REMOTE_ADDR} ^127.0.0.1 [OR]
RewriteCond %{REMOTE_ADDR} ^192.168.1.25
RewriteRule ^(.*)$ - [S=5]
AuthName "Protected Folder"
AuthType Basic
AuthUserFile /var/www/html/develSite/.htpasswd
Require valid-user
however, it is not skipping over the lines and thus prompting me still. I was hoping someone might lead me to what is missing.
Insted of mod_rewrite, you need to use the Satisfy directive: