Search code examples
phpwordpress.htaccess.htpasswd

htpasswd password protect site


I have member area and im try protect access to this url

http://site.com/wp/

with htaccess, all this working fine , here is code from my htaccess..

AuthName "My Site"
AuthType Basic
AuthUserFile /home/site/.htpasswd
AuthGroupFile /dev/null
require valid-user

But in same directory http://site.com/wp/ i have another folder where is my video and some application http://site.com/wp/app/

Now when user try access to site must enter username and pass because is protected with htaccess and when try play some videos from folder http://site.com/wp/app/ must enter again user and pass ?

Why 2 times must enter same username and pass ? And any idea how to fix this

I think should be asked once about login information... ?


Solution

  • There are two possible causes I can think of:

    • If Flash is used for playback, it might not include the basic auth headers when fetching video data.
    • There might be a mismatch in the protocol (http vs. https) or the domain part of the URL where the user first authenticates and the URL the videos are located at.