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 For Android Project - Interview with Lead Developer
Viewed 1046 times since Mon, Jul 26, 2010
AeroSQL - Web Based MySQL Management
Viewed 1122 times since Wed, Feb 24, 2010
Plupload - Multiple Files Upload Script
Viewed 1322 times since Tue, Feb 9, 2010
How do I add and register extra domain names?
Viewed 3405 times since Fri, Oct 9, 2009
50 Free And Quality Web Icons
Viewed 1436 times since Tue, Jan 5, 2010
Web Form Elements in PSD Format
Viewed 1026 times since Sun, Dec 27, 2009
Review of Mobile Web Application Frameworks
Viewed 1361 times since Mon, May 9, 2011
13 Useful Javascript Syntax Highlighting Scripts
Viewed 1361 times since Mon, Jan 4, 2010