====================================================================
方法一:
增加一行:
----------------------------------------------------------------
RewriteRule ^template/.*\.(html|htm)$ / [F]
----------------------------------------------------------------
到你的.htaccess里
红色 为模板目录
绿色 为模板后缀名
====================================================================
====================================================================
方法二:
增加下面四行:
----------------------------------------------------------------
<FilesMatch (.*)\.html$>
order allow,deny
deny from all
</FilesMatch>
----------------------------------------------------------------
到你的.htaccess里
绿色 为模板后缀名
====================================================================
通过以上两种方法,可以保护你的模板不被下载,防止模版文件被盗。