国外服务Apache乱码问题解决,默认字符编码修改为GB2312

| | Comments (0)



我想在国外服务器,中文页面显示乱码是老问题了,即使设置<meta http-equiv="Content-Type" content="text/html; charset=gb2312">,还是无效,网页打开还是乱码,如果不修改什么,唯一的方法是修改文件utf-8保存文件,但有时候必要用到GB2312来编辑网页。

那么怎么修改呢?

一,如果你是vps主机

修改http.conf,将"AddDefaultCharset ISO-8859-1″修改为"AddDefaultCharset GB2312″

二,如果你是虚拟主机,无权限修改http.conf文件,联系服务器供应商也不给你改的。

修改htaccess文件,添加两句话,
AddDefaultCharset off
IndexOptions Charset=GB2312

我相信,如果网页已经添加
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">标记,那么AddDefaultCharset off这句就够了,如果不行,两句都加上,是绝对可以的。。

以上为Apache目录浏览乱码,Apache乱码,Apache编码修改,htaccess编码修改,ISO-8859-1,GB2312,UTF-8,IndexOptions Charset,出现utf-8字符编码默认而出现网页 乱码的解决办法,是绝对有用的,亲测。

<a href="http://spoint.babyshoot.cn/">http://spoint.babyshoot.cn/ </a>首发,转载请保留出处

Leave a comment

Archives

Ads by google

Pages

Powered by Movable Type 4.24-en

About this Entry

This page contains a single entry by 单点日志 published on April 2, 2010 10:49 PM.

Google doodle:安徒生诞辰 205 年 was the previous entry in this blog.

分享2010最新的能做外链的论坛和网址 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.