Forum Moderators: phranque
Please help! I need it to only ask for the password when one initially goes on the site, not every time a page or image loads.
thanks to anyone who can help me...
Make sure you are using only one AuthName in the .htaccess files for all parts of the site that you want to use a common "login".
The resources cited in the second message of this recent thread [webmasterworld.com] may come in handy.
Jim
AuthType Basic
AuthName "FIT Presidential Scholars Members Only"
AuthUserFile /home/fit/public_html/passwordprotect/.htpasswd
require valid-user
Options +Includes
AddType text/html .html
AddHandler server-parsed .html
I have 1 htaccess file in the public_html folder. That is the only htaccess file. There is only one username & password for everyone to use. Is this an incorrect way of doing it? Everything is fine except that it asks for the password everytime an image loads.
I checked your link, and im not sure how it applies to my situation.
All I can offer is a band-aid solution, which may or may not help:
Replace your "require valid-user" line with all of the following lines. Replace the broken pipe "¦" characters in the third line with solid pipe characters before trying to use this code -- posting solid pipes on this board is not possible, but they are required in the code.
<FilesMatch "\.(gif¦jpe?g¦png)$">
Satisfy any
Allow from all
</FilesMatch>
Require valid-user
Jim
<added> Edited: Code tweak after testing </added>