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.

Article ID: 387
Created: Sun, Mar 14, 2010
Last Updated: Sun, Mar 14, 2010
Author: Administrator

Online URL: https://www.articlediary.com/article/how-to-prevent-access-to-a-specific-file-on-server-using-htaccess-387.html