0

On a centos Server 6.5, apache 2.2.15 is it possible to server multiple charsets to different virtual hosts?

I know that setting the default Charset is done by adding into the httpd.conf file:

AddDefaultCharset UTF-8

However some of the websites we have need to be encoded using ISO-8859-1 but the other websites that are served by Symfony need to be encoded with UTF-8. Is it possible to add a default charset per virtual host or does this need to be done using .htaccess files?

Liam Sorsby
  • 129
  • 2
  • 5

1 Answers1

1

You can specify the default charset per directory or vhost, see httpd.apache.org.

In short:

<Directory /some/dir>
    CharsetDefault ISO-8859-1
</Directory>

You'll also need to ensure that the mod_charset_lite module is enabled.

wurtel
  • 3,864
  • 12
  • 15