在nginx配置文件的server段添加如下代码即可防止用户盗取网站模板
方法一:
location ~*^/templets { rewrite ^/templets/(.*)$ http://网站地址/ permanent; }
当用户打开包含templets的网站地址的时候,会rewrite到网站首页
方法二:
location ~ /(templets)/.*\.(htm|html)?$ { return 403; }
用户直接访问模板路径文件,则显示禁止访问403
在nginx配置文件的server段添加如下代码即可防止用户盗取网站模板
方法一:
location ~*^/templets { rewrite ^/templets/(.*)$ http://网站地址/ permanent; }
当用户打开包含templets的网站地址的时候,会rewrite到网站首页
方法二:
location ~ /(templets)/.*\.(htm|html)?$ { return 403; }
用户直接访问模板路径文件,则显示禁止访问403
本作品采用知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议进行许可。作者:柴宏俊»dedecms模板保护