I'm building a wedding photo hosting site. Where I want to Show the Images but not direct access from address by using "view source" and find direct image link. I search here a lot. I find solution.
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://(www\.)?localhost:81 [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?localhost:81.*$ [NC]
RewriteRule \.(gif|jpg)$ - [F]
Something like this :81 is my port. I've tried to test in localhost but every time its fail. Someone write there that it's may be opening from cache but I cleared cache and then try again Still same problem. I'm using CodeIgniter/Php and I put that .htaccess file in the Image folder and once in root. What is the problem. My root folder is http://localhost:81/Project