» tagged pages
» logout
Jabber-linux
Return to Jabber XMPP resource

更改一个目录的apache的默认字符集

Tags Applied to this Entry

1 person has tagged this page:
首先确保apache允许目录单独设置
in /etc/apache2/apache2.conf 或 /etc/httpd/conf/httpd.conf

AllowOverride None
=>
AllowOverride All

如下

<Directory "/var/www/html">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

在具体目录的 .htaccess 增加gb2312,或utf8,iso8859-1等
AddDefaultCharset gb2312
类别:Linux Tuning 查看评论
Username:
Password:
(or Cancel)