1.修改.htaccess文件使网页编码为UTF-8或GB2312等,解决网页乱码!来源
AddDefaultCharset off或者
AddType text/html;charset=gb2312 html
AddDefaultCharset off
AddType text/html;charset=utf-8 html
2.用.htaccess进行目录密码保护。
Deny from all
AuthType Basic
AuthUserFile /www/directory/.htpasswd #指明了密码文件.htpasswd的位置,路径必须用绝对位置。
AuthName “Sinzi.Org” #提示信息
require valid-user
satisfy any www.sinzi.org
另存为.htaccess。新建一个密码文件.htpasswd。.htpasswd文件的内容格式为:user:password,password是加密的格式,用(http://www.4webhelp.net/us/password.php)生成一个.htpasswd加密文件。上传”.htaccess”和”.htpasswd”到你要加密的目录即可。


