Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Results 1 to 2 of 2

This is a discussion on Protecting files in a live directory in the Shared & Semi-Dedicated forum
Greetings, I am working on a site which will have a members-only section to view video files. I can easily enough authenticate users before they ...

  1. #1
    JPC Addict
    Join Date
    Nov 2004
    Posts
    106

    Protecting files in a live directory

    Greetings,

    I am working on a site which will have a members-only section to view video files. I can easily enough authenticate users before they view that page (and the embedded video), but I'd like to get your advice on how to prevent direct access to the video files.

    I've done some research and I believe .htaccess can be used to check the HTTP_Referer and deny anyone but localhost - but I've also read that a certain number of people have security settings which block (or change) this information and thus it may not be a great option.

    Example from http://www.thesitewizard.com/archive...dththeft.shtml

    Code:
    SetEnvIfNoCase Referer "^http://www.your-domain-name-here.com/" locally_linked=1
    SetEnvIfNoCase Referer "^http://www.your-domain-name-here.com$" locally_linked=1
    SetEnvIfNoCase Referer "^http://your-domain-name-here.com/" locally_linked=1
    SetEnvIfNoCase Referer "^http://your-domain-name-here.com$" locally_linked=1
    SetEnvIfNoCase Referer "^$" locally_linked=1
    <FilesMatch "\.(gif|png|jpe?g)$">
      Order Allow,Deny
      Allow from env=locally_linked
    </FilesMatch>

    Any ideas would be greatly appreciated.

  2. #2
    || $name ne 'R.Stiltskin'
    Join Date
    Jun 2003
    Location
    Tejas
    Posts
    2,438
    I've used the same method. I'll usually include some sort of notice somewhere in the site's support pages to indicate that visitors must enable their client referer. It isn't perfect but it's better than nothing.

Bookmarks

Posting Permissions

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