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.
0 (0)
Article Rating (No Votes)
Rate this article
Attached Files
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Name
Email
Security Code Security Code
Related Articles RSS Feed
What is rel="nofollow" attribute?
Viewed 987 times since Thu, May 13, 2010
UI Patterns - User Interface Design Pattern Library
Viewed 1383 times since Thu, Dec 31, 2009
ValidForm Builder - Creating Forms With Validation
Viewed 1138 times since Wed, Apr 21, 2010
5 Best Online Diagram Designing Tools
Viewed 14185 times since Sat, Jan 30, 2010
PHP Quiz Questions and Answers
Viewed 4297 times since Mon, Jan 11, 2010
Quick Tables for Showing & Updating DB Data
Viewed 1317 times since Sun, Dec 27, 2009
Web Usability Testing Tool - Clixpy
Viewed 1652 times since Sat, Jan 9, 2010
Featured Items Widget with jQuery
Viewed 1512 times since Sun, Dec 27, 2009
25 Graph & Chart Solutions For Web Developers
Viewed 33896 times since Mon, Feb 1, 2010
Free Android GUI PSD File
Viewed 1509 times since Fri, Dec 4, 2009