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.
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 740 times since Thu, May 13, 2010
Open Source WYSIWYG Editor
Viewed 1168 times since Thu, Jan 7, 2010
Free JavaScript Date Picker - jsDatePick
Viewed 1184 times since Fri, Apr 9, 2010
45 jQuery Navigation Plugins and Tutorials
Viewed 2111 times since Thu, Jan 28, 2010
How to redirect an old domain to a new domain using htaccess?
Viewed 749 times since Sun, Mar 14, 2010
Modify HTTP Headers in PHP with Examples
Viewed 960 times since Wed, Mar 10, 2010
Inline Form Validation With jQuery
Viewed 1170 times since Sat, Jan 9, 2010
Stylish Cross-Browser CSS Buttons - Simply-Buttons v2
Viewed 925 times since Thu, Nov 12, 2009
ProFolio - Instantly Create Free Portfolio Website
Viewed 1257 times since Sun, Jan 3, 2010
MENU