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
25 Graph & Chart Solutions For Web Developers
Viewed 34093 times since Mon, Feb 1, 2010
What is rel="nofollow" attribute?
Viewed 1041 times since Thu, May 13, 2010
Create Full Screen Slideshows With Supersized
Viewed 1412 times since Tue, Jan 5, 2010
8 Basics of Regular Expressions
Viewed 1229 times since Mon, Mar 8, 2010
Google Web Toolkit - Version 2 Released
Viewed 1283 times since Tue, Dec 15, 2009
Coming Soon Template
Viewed 1324 times since Thu, Nov 12, 2009
Pastie - Pastebin to Share Source Code with Syntax Highlighting
Viewed 1250 times since Mon, Jan 11, 2010
PHP Sound Captcha
Viewed 11131 times since Sun, Apr 11, 2010
Create A Page Peel Effect With CSS & jQuery
Viewed 1297 times since Tue, Jan 5, 2010
jQuery MultiSelect Plugin with ThemeRoller Support
Viewed 2770 times since Thu, Feb 4, 2010