Reputation: 1071
Is there a way to not allow anyone to have access to the contents of a folder unless the were referred by a certain site? So if someone tried to load music.mp3 can I redirect them, but if example.com referred them allow them to see it. Would this be done through .htaccess?
Thanks!
Upvotes: 0
Views: 71
Reputation: 18550
something like
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://www\.example\.com [NC]
RewriteRule \.jpg - [F]
should work
if its not http://example.com then give 403 status code
Upvotes: 1