phphtpasswd password protect site

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

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 i have another folder where is my video and some application

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

Related Articles
  • This is a basic question without a code sample. I'm not really into web programming but I wonder if there is a way to handle login forms of several webpages by using NSURL or NSURLConnection. If this isn't possible, how do I examine which method to u
  • I have an ASP.NET MVC 5 web application running on Azure as a webrole. Is there any way to easily password protect the entire website? I do not want any signup or account handling, just a single password to enter the site (and perhaps a username, but
  • I am building a prototype of a web app for a client, using axure - which is all front-end code (html/css/js files) - no php at all, so i can't use php authentication (sessions, etc) within the prototype itself. So to protect it, the prototype is in a
  • I am trying to create the media recorder for Android by creating the folders with password protection and audio files inside. But now I only can create the folder and audio files which other Apps and user of the Android smartphone to access. The purp
  • I need to create and read password protected csv file in android . Is it possible with android ?? IF not then is there any other file formate which is password protected with android ?? Is there any solution for ?? Thanks in advance. Here is a guide
  • I have an android application in wich I can export/inport my database to sdcard. I do it simply by using: FileChannel src = new FileInputStream(currentDB).getChannel(); FileChannel dst = new FileOutputStream(backupDB).getChannel(); dst.transferFrom(s
  • i am able to read normal pdf file which does not have any password properly using pdfviewer.jar, however when i try to read password protected file i get java.lang.StackOverflowError. can any one tell me what is wrong ? following is the code Intent i
  • Herroo everyone! I am building a website for my dad. He is an accountant. We have Google calendars setup for him to take appointments. The website is just a pretty front page with three clickable images that link to different calenders. Two of the bu
  • I was wondering if anyone can advise me on how to create a custom Wordpress Post Type based on a page template that is password protected by default? How do I go about doing this? I have tried a few plugins such as "Custom Post Type UI" but cann
You Might Also Like