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
PHP For Android Project - Interview with Lead Developer
Viewed 1295 times since Mon, Jul 26, 2010
ICEpdf - Open Source Java PDF Library
Viewed 1529 times since Wed, Jan 6, 2010
Stylish Cross-Browser CSS Buttons - Simply-Buttons v2
Viewed 1231 times since Thu, Nov 12, 2009
SEO (Search Engine Optimization) vs SEM(Search Engine Marketing)
Viewed 1008 times since Mon, Jul 12, 2010
Geo-location Mapping With Google Maps API & PHP
Viewed 1661 times since Mon, Apr 4, 2011
Open Source Online Invoice System - siwapp
Viewed 1598 times since Thu, Jan 7, 2010
10 Most Popular JavaScript Frameworks
Viewed 1328 times since Thu, Jul 8, 2010
Create A Page Peel Effect With CSS & jQuery
Viewed 1236 times since Tue, Jan 5, 2010
How can I change session timeout value?
Viewed 1144 times since Tue, Apr 27, 2010
13 Useful Javascript Syntax Highlighting Scripts
Viewed 1681 times since Mon, Jan 4, 2010