+ Reply
Results 1 to 11 of 11

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.


Thread: mp4 videos Streaming quicktime w/ .htaccess?

is a discussion within the

Web Apps

forums, a part of the

3rd Party Apps For iPhone | iPod Touch

section;
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
...
  1. #1
    What's Jailbreak?
    Join Date
    Jul 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default mp4 videos Streaming quicktime w/ .htaccess?
    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; 08-20-2008 at 12:51 AM. Reason: Automerged Doublepost

  2. #2
    My iPhone is a Part of Me
    Join Date
    Sep 2007
    Posts
    505
    Thanks
    21
    Thanked 94 Times in 79 Posts

    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 Attached Files
    Last edited by DaveiPhone; 08-20-2008 at 01:34 AM.

  3. #3
    What's Jailbreak?
    Join Date
    Jul 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Quote Originally Posted by DaveiPhone View Post
    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 ?

  4. #4
    My iPhone is a Part of Me
    Join Date
    Sep 2007
    Posts
    505
    Thanks
    21
    Thanked 94 Times in 79 Posts

    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.

  5. #5
    What's Jailbreak? biswajitghosh's Avatar
    Join Date
    Feb 2008
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Its still not ready for 1.2.0.2 firmware.It crashes in between.

  6. #6
    My iPhone is a Part of Me
    Join Date
    Sep 2007
    Posts
    505
    Thanks
    21
    Thanked 94 Times in 79 Posts

    Huh? I've been using this for months, never a crash.

  7. #7
    Green Apple
    Join Date
    Jul 2008
    Posts
    40
    Thanks
    0
    Thanked 5 Times in 3 Posts

    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.

  8. #8
    Green Apple
    Join Date
    Sep 2008
    Posts
    42
    Thanks
    0
    Thanked 4 Times in 3 Posts

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

  9. #9
    iPhone? More like MyPhone
    Join Date
    Sep 2007
    Location
    New York City
    Posts
    100
    Thanks
    2
    Thanked 1 Time in 1 Post
    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?

  10. #10
    Banned
    Join Date
    Dec 2008
    Location
    Chicago, Illinois
    Posts
    158
    Thanks
    18
    Thanked 15 Times in 11 Posts

    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?

  11. #11
    iPhone? More like MyPhone
    Join Date
    Sep 2007
    Location
    New York City
    Posts
    100
    Thanks
    2
    Thanked 1 Time in 1 Post
    Are we allowed to back-and-forth like this? Sorry to the mods!

    I do not want public access to the files, no.

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts