Recommended Posts

Posted

You should be able to do this via .htaccess:

RewriteEngine on

RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yourdomain.com [NC]

RewriteRule \.(flv|avi)$ - [NC,F,L]

If you want to display a custom message and what not, in the third line there replace the '-' with:

RewriteRule \. (flv|avi)$ http://yourdomain.com/customimage.jpg [NC,F,L]

Obviously replace http://yourdomain.com/customimage.jpg with the proper URL

You can also add any extension type in the third line there to modify / customize your needs.

Hope this helps (and works :))

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...