Article Diary - General Knowledge Digest

How to prevent access to a specific file on server using htaccess?

If you want to block with the file name abc.jpg, the followig htaccess code will prevent the viewing of this file.
# prevent access of a certain file

order allow,deny
deny from all
Put this code in your .htaccess file.
Attached Files
There are no attachments for this article.
There are no comments for this article. Be the first to post a comment.
Security Code Security Code
Related Articles RSS Feed
File Upload in PHP - PHP File Upload Script
Viewed 2782 times since Thu, Nov 5, 2009
Free Under Construction Coming Soon Template
Viewed 2500 times since Sat, Mar 12, 2011
How to password protect folder/files using htaccess file?
Viewed 1292 times since Sun, Mar 14, 2010
Coming Soon Template
Viewed 1342 times since Thu, Nov 12, 2009
ZeusCart | Feature Rich Open Source E-Commerce System
Viewed 1950 times since Thu, Jul 15, 2010
10 Most Popular JavaScript Frameworks
Viewed 1485 times since Thu, Jul 8, 2010
ICEpdf - Open Source Java PDF Library
Viewed 1620 times since Wed, Jan 6, 2010
Lorem Ipsum Dolor Sit Amet
Viewed 1808 times since Tue, Oct 6, 2009
13 Useful Javascript Syntax Highlighting Scripts
Viewed 1786 times since Mon, Jan 4, 2010
10 Tips for Writing Better CSS Code
Viewed 1495 times since Fri, Nov 27, 2009