HEPL | Protecting Image




I always get answered on this forum. I again expect the same.

Basically I have created a shopping cart having images of products in a folder. Suppose image folder. Now what I want to do is that I want to restrict the user from opening the image by full path.

i.e. http://site.com/product/image/product1.gif.

Recently I also study the mod_rewrite module of apache. I think this module can help me in doing the task I want to do? But frankly speaking I am not able to implement this module. I am constantly doing R&D on this module until I don’t have successes.

Meanwhile can any one suggest me, how can I achieve the task I want to do?


Vikas Garg
what should i write into the .htaccess file to deny image.

<Files "\.(gif|png|jpg)$">
order allow,deny
deny from all

I put the above code in .htaccess folder. But it dont work. However i put the following line in .htacess file and it work.

Redirect temp /images http://www.yahoo.com/

:-? :-?
To directly deny is not a good thing
The best way in your site
Check out this link

Yes, you are right. Even my solution also not worked.

So i one again back on the mod_rewrite for solving my problem.

wish i got sucessed in implementing mod_rewrite module.