tibberous Posted July 17, 2007 Share Posted July 17, 2007 I need to block .inc files from being served. Is there a way I can do that with apache? Link to comment https://forums.phpfreaks.com/topic/60376-can-i-use-htaccess-to-block-a-file-type/ Share on other sites More sharing options...
steviewdr Posted July 17, 2007 Share Posted July 17, 2007 Put this in a .htaccess file: FilesMatch "\.(inc)$"> Order Allow,Deny Deny from all </FilesMatch> That should do it. -steve Link to comment https://forums.phpfreaks.com/topic/60376-can-i-use-htaccess-to-block-a-file-type/#findComment-300378 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.