Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: redirect changes encoding of HTML response |
|
Author |
|
timc
Joined: 08 Apr 2014 Posts: 3
|
Posted: Mon 09 Jan '17 0:02 Post subject: redirect changes encoding of HTML response |
|
|
I've set Apache 2.4 server to Code: | AddDefaultCharset utf-8 | in httpd.conf and my .htaccess file redirects all non-www and http traffic to https://www.example.com as follows:
Code: | RewriteEngine On
RewriteCond %{HTTP_HOST} ^example\.com$ [OR]
RewriteCond %{HTTPS} !on
RewriteRule ^(.*)$ https//www.example.com/$1 [R=301,L,NE] |
Now, If I look at the HTTP response header, only traffic sent to `https://www.example.com` generates an UTF-8 response.
The non-www and http traffic respond with ISO-8859-1 charset.
How to ensure all URL-redirect HTTP responses are in UTF-8? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Thu 26 Jan '17 15:50 Post subject: |
|
|
add
AddDefaultCharset utf-8
in each vhost |
|
Back to top |
|
|
|
|
|
|