Search code examples
apachehotlinking

Hotlinking protecttion of only one directory


I want to block access to only one directory say http://www.example.com/pictures Every file in other directory should be available as normal.

I have gone through a referrer checking solution. That can be easily bypassed.

I Simply want to show images in pictures directory on a page say view.php if images in this directory accessed from anywhere else. Just redirect to an image that says hotlinking not allowed"

Thanks


Solution

  • I have gone through a referrer checking solution. That can be easily bypassed.

    Yes, it can. But so can any hotlink-prevention scheme. It'll deter casual/careless use, but that's about it.

    For what it's worth, referrer-checking is pretty much the way to do it.