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
PHP Quiz Questions and Answers
Viewed 3180 times since Mon, Jan 11, 2010
Axiis - Open Source Data Visualization Framework
Viewed 1236 times since Thu, Jan 7, 2010
Google Web Toolkit - Version 2 Released
Viewed 991 times since Tue, Dec 15, 2009
CSS Positioning - Absolute, Relative & Fixed
Viewed 1282 times since Thu, Dec 3, 2009
Best Free Web Icons for Different Purposes
Viewed 1082 times since Mon, Dec 28, 2009
File Upload in PHP - PHP File Upload Script
Viewed 2142 times since Thu, Nov 5, 2009
PHP For Android Project - Interview with Lead Developer
Viewed 999 times since Mon, Jul 26, 2010
How can I change session timeout value?
Viewed 948 times since Tue, Apr 27, 2010
Create Dynamic Tabs with jQuery
Viewed 945 times since Sat, Feb 6, 2010