isaac_cm Posted November 14, 2006 Share Posted November 14, 2006 I have my site online now and I worried about hacks so I should prevent direct access to my images folder , I tried to use .htaccess and it work but since my home page and my templates use images in this folder , now every one try to visit my site will be prompt for user/passI was told I have to move my /images folder outside my root folder , for example my root folder is "root" so I have to move images outside "root" and write script to make the images refer correctly to the new placethe problem I do not know what should I do, I know php but I need only highlight stepsthanks Quote Link to comment Share on other sites More sharing options...
haaglin Posted November 14, 2006 Share Posted November 14, 2006 You can put an empty index.html file in you directory. then all they see is a blank page. Quote Link to comment Share on other sites More sharing options...
fert Posted November 14, 2006 Share Posted November 14, 2006 chmod Quote Link to comment Share on other sites More sharing options...
mcmuney Posted November 15, 2006 Share Posted November 15, 2006 I use an index file that redirects to my homepage. Quote Link to comment Share on other sites More sharing options...
isaac_cm Posted November 15, 2006 Author Share Posted November 15, 2006 index is very good solution, fert can you please tell me what permission I have to set , in the same time I want my images to be displayed in the home pagethanks Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted November 15, 2006 Share Posted November 15, 2006 place this file in the directories folder, and tell me how it works.filename: [b].htaccess[/b][code]<Files ~ "^.*\.([Jj][Pp][Gg])"> Order allow,deny Deny from all Satisfy All</Files>[/code] Quote Link to comment Share on other sites More sharing options...
isaac_cm Posted November 15, 2006 Author Share Posted November 15, 2006 I sill able to list images Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted November 15, 2006 Share Posted November 15, 2006 Try this:http://www.javascriptkit.com/howto/htaccess7.shtml Quote Link to comment Share on other sites More sharing options...
isaac_cm Posted November 15, 2006 Author Share Posted November 15, 2006 where sould I place the following commandRedirect /olddirectory http://yoursite.com/newdirectory/in the index.html or .htaccessthanks Quote Link to comment Share on other sites More sharing options...
isaac_cm Posted November 15, 2006 Author Share Posted November 15, 2006 place [b]IndexIgnore *[/b] work but any one can right click on the picture and get the url of this pic and use it or even save itfor example http://www.domain.com/images/mypic.gifstill could be access Quote Link to comment Share on other sites More sharing options...
SharkBait Posted November 16, 2006 Share Posted November 16, 2006 If you manage to block them from getting into your images directory, you could then use .htaccess and an Apache Mod_rewrite and block hotlinking to the images.I don't have my sample of denying hot-linking of images/pdfs because my server is currently down until I go in tomorrow to turn it on. Quote Link to comment Share on other sites More sharing options...
isaac_cm Posted November 16, 2006 Author Share Posted November 16, 2006 thanks SharkBait I am willing to see your example Quote Link to comment Share on other sites More sharing options...
isaac_cm Posted November 20, 2006 Author Share Posted November 20, 2006 I used .htaccess to prevent hot link to any of my images, but I need to link to some of my images that I want to place in my newsletter emails I send to my customerswhat should I do ? Quote Link to comment Share on other sites More sharing options...
JasonLewis Posted November 20, 2006 Share Posted November 20, 2006 i would just do wat was mentioned before and place a blank or add some error text in an index.html. thats what IPB does. Quote Link to comment Share on other sites More sharing options...
isaac_cm Posted November 20, 2006 Author Share Posted November 20, 2006 it seems that there is no solution for this security problemIn case someone subscribe to my newsletter and receive email from me he will simply will right click on the image and know the link to my site logo so he can use this link and send emails to my customers to fraud them as it was from meany idea ? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.