以下代码放在nginx的http{}之间,可以所有站点开启
gzip on;
gzip_http_version 1.0;
gzip_disable "MSIE [1-6].";
gzip_types text/plain application/x-javascript text/css text/javascript application/x-httpd-php image/jpeg image/gif image/png;
去掉X-Powered-By ThinkPHP的信息
找到文件ThinkPHP/Library/Think/View.class.php,注释以下这行
//header('X-Powered-By:ThinkPHP');
gzip on;
gzip_http_version 1.0;
gzip_disable "MSIE [1-6].";
gzip_types text/plain application/x-javascript text/css text/javascript application/x-httpd-php image/jpeg image/gif image/png;
去掉X-Powered-By ThinkPHP的信息
找到文件ThinkPHP/Library/Think/View.class.php,注释以下这行
//header('X-Powered-By:ThinkPHP');