سؤال

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... ?

هل كانت مفيدة؟

المحلول

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.

نصائح أخرى

That does seem strange. Are you perhaps adding or removing a "www." prefix somewhere?

But why are you using htpasswd anyway? If you want to add password protection to pages in a WordPress site, just change the visibility to "Password protected" in the "Publish" options part of the editor page.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top