Jump to content

Some help w/.htaccess / .htpasswd pls


STaRDoGG

Recommended Posts

Lo all,

 

I am doing some ip[ logging using an image. And it requires a .htaccess file to work, which is below (and works fine):

 

AuthUserFile /dev/null
AuthGroupFile /dev/null

RewriteEngine On
ReWriteRule .*\.(jpg|gif)$ http://www.mysite.com/mypage/visitorlog.php [R,L]

 

I have decided now that I want to give just that folder a password to block prying eyes. So I made this alteration (I'll leave out the .htpasswd file code since I know it's ok):

 

AuthUserFile /home/www/mysite.com/mypage/.dhjpofh
AuthType Basic
AuthName "Hi There"
Require valid-user
AuthGroupFile /dev/null

RewriteEngine On
ReWriteRule .*\.(jpg|gif)$ http://www.mysite.com/mypage/visitorlog.php [R,L]

 

 

Now the problem I ran into, is that the gif image that originally worked with the first htaccess code, that kicks off the entire logging process, is now a broken image using the new code, so the logging no longer happens. I am no wizard with the .htaccess stuff so i figure it's probably something simple, but I need the help of the pro's.

 

All help much appreciated. =)

 

Link to comment
https://forums.phpfreaks.com/topic/81249-some-help-whtaccess-htpasswd-pls/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.