Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
  1. #1
    Junior Member Router's Avatar
    Join Date
    Feb 2003
    Posts
    5
    Member #
    742
    protecting avi files

    I need to know how i can protect the avi files on my server from being linking in other sites.
    I have done with images, and works but with avi files it does not work.
    Can someone help me?

  2.  

  3. #2
    Senior Member nsr81's Avatar
    Join Date
    Oct 2002
    Posts
    1,132
    Member #
    250
    Liked
    15 times
    did you use .htaccess hotlink protection for the images? If so, then you can add "avi" extention to the file types that need to be protected.

    Try using the following RewriteRule:
    Code:
    RewriteRule .*\.(gif|GIF|jpg|JPG|mpg|MPG|avi|AVI|mov|MOV|rm|RM|wav|WAV)$ - [F]
    There and Back Again :Ogre:

  4. #3
    Junior Member Router's Avatar
    Join Date
    Feb 2003
    Posts
    5
    Member #
    742
    RewriteEngine on

    Options +FollowSymlinks


    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://www.mysite.org [NC]
    RewriteCond %{HTTP_REFERER} !^http://clips.mysite.org[NC]
    RewriteCond %{HTTP_REFERER} !^http://mysite.org [NC]
    RewriteRule .*\. (gif|GIF|jpg|JPG|mpg|MPG|avi|AVI|mov|MOV|rm|RM|wav
    |WAV)$ - [F]


    With your rewrite rule i can not even see the avi's from my server.

    My server is running under www.mysite.org
    Then we have a second server that runs in clips.mysite.org

    I have put the .htacess in the clips.mysite.org but now refuses the access to anyone. the clips.mysite.org is only a storage server, and everything should be acessed from www.mysite.org

    Thanks for helping.

  5. #4
    Senior Member nsr81's Avatar
    Join Date
    Oct 2002
    Posts
    1,132
    Member #
    250
    Liked
    15 times
    The RewriteRule is on a single line. also there should not be any space between \. and (gif part. sorry about that.
    There and Back Again :Ogre:

  6. #5
    Junior Member Router's Avatar
    Join Date
    Feb 2003
    Posts
    5
    Member #
    742
    yes I have that all in the same line and it still no access from my server.

  7. #6
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    Theoretically, someone could then request movie.Avi from your server and still get it.

    Why not just restrict access on all non-html files? like this:
    Code:
    RewriteRule .*\.([a-gi-zA-GI-Z].*)$ - [F]
    If I remember my regular expressions correctly, that should work. You could also exclude P's similarly for PHP access..... i dunno, just a thought

  8. #7
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    BTW, Router, what he meant by all on one line is this:


    RewriteRule .*\.(gif|GIF|jpg|JPG|mpg|MPG|avi|AVI|mov|MOV|rm|RM |wav|WAV)$ - [F]



    EDIT: interesting... the forum is putting a space after the RewriteRule .*\. and a break before |WAV no matter what I do.

    EDIT again: HAH... got it... had to use ampersand codes to get the characters to show right, lol

  9. #8
    Senior Member nsr81's Avatar
    Join Date
    Oct 2002
    Posts
    1,132
    Member #
    250
    Liked
    15 times
    Originally posted by transio
    Theoretically, someone could then request movie.Avi from your server and still get it.
    Not on a *nix server, but then again, no one said that he is using a *nix machine
    There and Back Again :Ogre:

  10. #9
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    Actually, I don't know much at all about htaccess or unix. But I saw that you were using regex and thought it might work :-P

  11. #10
    Junior Member Router's Avatar
    Join Date
    Feb 2003
    Posts
    5
    Member #
    742
    I am using a nix macchine


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 10:42 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com