|
deny accessing the dir but still allow images in the dir to be used by 'HTML'
deny 'directly' allow 'indirectly' (.htaccess)
I am running apache web server on CentOS5.2
I have the directory in which stores a lot of images.(/var/www/html/images)
I want to deny everyone from directly accessing the directory but still allow images in the directory to be used by 'HTML' (/var/www/html/pic.html <img src="http://localhost/images/hotimg.jpg">)
=>someone cannot access that specific directory directly.
1)create .htaccess in images directory
2)type following lines and save
order allow,deny
deny from all
but I don't know how to allow images in the directory to be used by HTML(pic.html <img src="http://localhost/images/hotimg.jpg">)
thanks in advance
Last edited by wikignu; 01-12-2009 at 10:07 AM.
|