Content-Type-Not-Correct/EN/Solution Tips

Aus Siwecos
Version vom 4. Juli 2018, 09:10 Uhr von Siwebot (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „Add the appropriate HTTP header or, alternatively, add a <meta> tag. Please note that, unlike a HTTP header, the <meta> tag can be attacked more easily. '''…“)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Wechseln zu: Navigation, Suche

Add the appropriate HTTP header or, alternatively, add a <meta> tag. Please note that, unlike a HTTP header, the <meta> tag can be attacked more easily.

text/html; charset=utf-8;

--snip

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

—snap


Furthermore, the server must be configured to send the correct charset information. In order to make these changes on the server, particular access rights are required. For further information about the different server configuration options, please refer to W3.org.

Moreover, it is also possible to pass the correct charset information to the .htaccess file, which will overwrite the declaration in the HTTP header. charset in .htaccess

Enter in the .htaccess file:

AddType 'text/html; charset=UTF-8' html

Here is an example of an .htaccess file which will set the HTTP-Security-Header-Scanner to green. (.htaccess-Beispiel)