1. Persius's Avatar
    So I have mp4 videos uploaded on my web hosting service. To be safe, I have given the directory where they are located your standard username & password protection using .htaccess.

    The problem is, iPhone's Safari won't stream the mp4s with the authentication in place. It streams it perfectly without the .htaccess authentication, but consistently get "movie could not be played" errors with.

    They stream perfectly in every computer-based browser I throw at it regardless.

    it's something about the iphone that when you try to access a video when you are logged into a pass protected area, the mp4 wont play... the phone doesnt carry your user/pass.

    anyone know the fix? or another way around this?

    bump,... anyone ? this is driving me nuts ive been trying to figure this out for hours!
    Last edited by Persius; 2008-08-20 at 08:51 AM. Reason: Automerged Doublepost
    2008-08-20 08:51 AM
  2. DaveiPhone's Avatar
    In order to make this work, I had to add this to my .htaccess file. This will lower your security level in that someone having a complete path to a particular media file could access it without a password, but I never found another work around.

    (see attachment)
    Attached Files
    Last edited by DaveiPhone; 2008-08-20 at 09:34 AM.
    2008-08-20 09:29 AM
  3. Persius's Avatar
    In order to make this work, I had to add this to my .htaccess file. This will lower your security level in that someone having a complete path to a particular media file could access it without a password, but I never found another work around.

    (see attachment)
    the problem is i need them to be protected, any other way around this ?
    2008-08-20 10:07 AM
  4. DaveiPhone's Avatar
    They are still protected this way. You still need to login to the server, and you can use many tricks to make it nearly impossible to guess a path. My security point is that if you know the EXACT path to a particular file, you can get to it without needing to login first. Most pay sites for example, are the same. There are relatively few sites that are secure once you know an interior path. But they still, for example, couldn't get a directory listing.
    2008-08-20 05:34 PM
  5. biswajitghosh's Avatar
    Its still not ready for 1.2.0.2 firmware.It crashes in between.
    2008-08-21 07:36 PM
  6. DaveiPhone's Avatar
    Huh? I've been using this for months, never a crash.
    2008-08-22 05:48 AM
  7. wookiee2cu's Avatar
    Why do they need to be protected? As long as you don't tell anyone the file path or the file name, people won't find it.
    2008-09-03 11:40 PM
  8. dapaintballer331's Avatar
    I have a fix.
    Instead of htaccess/htpasswd, use php's cookie/session authorization. If you can password protect a php page, php can protect files as well.

    Create a php login/authorization script (5 minutes?)
    Put all protected files in a folder that has "Deny ALL" in htaccess
    Create a dl.php file. If they are logged in, have it stream the files in the deny all folder (php can access this, deny all is for http only). If you want quicktime to play the file, be sure to have it send the correct mimi type in the headers. (video/mpeg?)
    2008-09-27 04:11 PM
  9. discostar's Avatar
    Thankfully I'm a LVL 7 Necromancer and can bring this thread back from the dead!

    I think this is the problem I'm having. I have videos behind a password and they just won't play. To be honest, this PHP stuff is a bit over my head. Is there a way around this, or is the PHP scripts the best way?
    2009-02-26 10:29 PM
  10. Nick Z's Avatar
    Just out of curousity why are you trying to hide your files? From the server? Or you don't want public users to have access to them?
    2009-02-26 11:14 PM
  11. discostar's Avatar
    Are we allowed to back-and-forth like this? Sorry to the mods!

    I do not want public access to the files, no.
    2009-02-27 12:09 AM
LINK TO POST COPIED TO CLIPBOARD