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
jQuery Slider from a Select Element
Viewed 2684 times since Thu, Jan 14, 2010
PHP Interview Questions with Answers - Part 1
Viewed 1359 times since Mon, Jan 11, 2010
UI Patterns - User Interface Design Pattern Library
Viewed 1332 times since Thu, Dec 31, 2009
Lorem Ipsum Dolor Sit Amet
Viewed 1606 times since Tue, Oct 6, 2009
Featured Items Widget with jQuery
Viewed 1477 times since Sun, Dec 27, 2009
imgAreaSelect - jQuery Plugin To Select Areas On Images
Viewed 1530 times since Thu, Dec 31, 2009
Embeddable Google Document Viewer For Websites
Viewed 1129 times since Fri, Mar 11, 2011
Speech Bubbles With Pure CSS3
Viewed 1122 times since Fri, Mar 12, 2010
Which hosting plans support IIS Mod-Rewrite?
Viewed 4640 times since Sat, Oct 10, 2009