Hi all, I want to prevent direct access of the images folder of my website ..I'm running wamp server in my local machine and I used this <Directory "C:/wamp/www/website/images/"> Order Deny,Allow Deny from all </Directory> Still I'm able to hit the actual path on my browser and handle the images.. Should I have to do any other apache tuning?? I'm new to php and I've no idea abt these config files.. Kindly help me do this.. Thanks in advance!
try this Prevent Unauthorized Directory Browsing ^ Prevent unauthorized directory browsing by instructing the server to serve a “xxx Forbidden - Authorization Required†message for any request to view a directory. For example, if your site is missing it’s default index page, everything within the root of your site will be accessible to all visitors. To prevent this, include the following htaccess rule: # disable directory browsing Options All -Indexes Conversely, to enable directory browsing, use the following directive: # enable directory browsing Options All +Indexes Likewise, this rule will prevent the server from listing directory contents: # prevent folder listing IndexIgnore * And, finally, the IndexIgnore directive may be used to prevent the display of select file types: # prevent display of select file types IndexIgnore *.wmv *.mp4 *.avi *.etc
Thanks for the reply.. I guess, the last statement should do the job..But, where should I include these lines..? within the directory tag? Sorry for the blunt question :-/
Just use .htaccess hotlinking protection Sory, i can not paste the code here because its containg http. So here it is altlab dot com/htaccess_tutorial.html Good luck