Restrict access to images on my website except through my own htmls

前端 未结 5 378
没有蜡笔的小新
没有蜡笔的小新 2021-01-03 14:33

On my website I store user pictures in a simple manner such as: \"image/user_1.jpg\".

I don\'t want visitors to be able to view images on my server just by trying us

5条回答
  •  耶瑟儿~
    2021-01-03 15:19

    You can look up "Hotlinking prevention" via htaccess and i think that should be a simple solution for the type of protection you need. However its not fool proof , people who will really want to get those images will find a work around by faking the referrer.

    http://altlab.com/htaccess_tutorial.html

提交回复
热议问题