Activity Stream
48,167 MEMBERS
6860 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 4 of 4
  1.     
    #1
    Member

    Default Restrict access for certain files in browser - but allow in website

    Hello,

    I want to disable possabilety to someone request files from my site, via browser - HTTP, for example:
    If someone see my source code, and find file like this:

    PHP Code: 
    http://mywebsite.com/captions/temp2/JustyLuck.srt 
    Then try to enter it in browser, and download it. To see some error, or message like 'Don't Steal'.

    But, that file, should work in my flash player on mywebsite.com url.
    So, denny access for everyone except my own website, this is caption of video.

    I have tried

    Code: 
    <Files ~ "\.srt$">
    Order allow,deny
    Deny from all
    Allow from env=local_referal
    </Files>
    Didn't work.

    Thanks.
    igordr Reviewed by igordr on . Restrict access for certain files in browser - but allow in website Hello, I want to disable possabilety to someone request files from my site, via browser - HTTP, for example: If someone see my source code, and find file like this: http://mywebsite.com/captions/temp2/JustyLuck.srt Then try to enter it in browser, and download it. To see some error, or message like 'Don't Steal'. But, that file, should work in my flash player on mywebsite.com url. Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Respected Member
    Here you go. Will allow playing in player but no direct access via url..
    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?yoursite [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?yoursite.*$ [NC]
    RewriteRule \.(srt)$ - [F]

  4.     
    #3
    Member
    Thanks Lock Down.
    It's working. But, will it work in all browsers, fine?

  5.     
    #4
    Respected Member
    You are welcome and the answer should be yes. Worked in opera & FF for me.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Check your website in 100 Browser
    By Nice_one_120 in forum Useful Sites
    Replies: 11
    Last Post: 17th Sep 2012, 05:20 PM
  2. clear browser cache Button on website
    By DevilLnC in forum Web Development Area
    Replies: 11
    Last Post: 29th Apr 2012, 05:59 PM
  3. unable to access my website...
    By haseeb221093 in forum Server Management
    Replies: 0
    Last Post: 28th Aug 2010, 05:54 AM
  4. Website does not load in browser but does in proxy
    By StarTech in forum Technical Help Desk Support
    Replies: 2
    Last Post: 31st Mar 2010, 07:36 AM
  5. Restrict...
    By GeeZus in forum Feedback and Suggestions
    Replies: 19
    Last Post: 11th Jun 2009, 06:49 PM

Tags for this Thread

BE SOCIAL