.htaccess - cPanel - How to control permission of files so only I can show them, but they cannot directly go to it? -


say have folder /images. there way limit access folder, if goes /images/myimage.png, cannot view it, if can still display image on site, i.e. <img src='/images/myimage.png' /> still shows on website?

thanks

yes, 1 way verifying %{http_referer} , allow valid refer view images not bulletproof method.

rewritecond %{http_referer} !^http://(www\.)?yourdomain.com [nc] rewritecond %{request_uri} ^/images [nc] rewriterule ^ / [r=301,l] 

the above rule verify if image not have referrer domain, , path starts images, if case redirects domain home page.


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -