I have a .htaccess file that looks like this:
AddDefaultCharset utf-8 AddCharset utf-8 .html Order Allow,Deny ErrorDocument 403 "Error 403 - Esta ubicación no es pública"
The file itself is encoded as UTF-8. However, Apache insists on declaring ISO-8859-1, and the error message is garbled:
HTTP/1.1 403 Forbidden Date: Fri, 29 Nov 2013 10:06:25 GMT Server: Apache/2.4.6 (Win32) OpenSSL/1.0.1e PHP/5.5.6 Content-Length: 42 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: text/html; charset=iso-8859-1
If I manually change the encoding to UTF-8, the text looks correct in my browser.
The site received all permissions:
<VirtualHost *:80> ServerName tmp DocumentRoot "D:/tmp" <Directory "D:/tmp"> AllowOverride All Require all granted </Directory> </VirtualHost>
... and in Apache logs nothing is significant.
What bit am I missing?
Álvaro González
source share