twhiting9275 Posted August 21, 2008 Share Posted August 21, 2008 Not surprisingly, I found yet a better way to do this (for a global configuration): in /usr/local/apache/conf, remove the previous entries (in my last post), and add: <Directory "/"> Options All AllowOverride All <Files ~ ".(pl|txt|tpl|inc)$"> Order allow,deny Deny from all Satisfy All </Files> </Directory> This will deny direct access to the following filetypes (you can add more as you like): pl (perl) txt (text) tpl (template) inc (include) to add another, or remove one, it's very simple. Edit the line <Files ~ ".(pl|txt|tpl|inc)$"> to add the extension (or remove it), as ext| . If you remove one, don't forget to remove the pipe (|) after it. Of course, this is server wide, so you don't need the .htaccess mods in the directory. 0 Quote Link to comment Share on other sites More sharing options...
stormy Posted March 8, 2012 Share Posted March 8, 2012 I think WHMCS should ship with an .htaccess in the templates directory, or include this as part of the install instructions. 0 Quote Link to comment Share on other sites More sharing options...
zomex Posted March 9, 2012 Share Posted March 9, 2012 Nice code, I've been using this for some time and it works well. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.