Content-Type-Not-Correct/EN/Solution Tips: Unterschied zwischen den Versionen

Aus Siwecos
Wechseln zu: Navigation, Suche
 
(3 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
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.
+
If the content type declaration is not configured correctly, your website is probably vulnerable to attacks.
 +
 
 +
Add the appropriate HTTP [[Header/EN|header]] or, alternatively, add a <meta> tag. Please note that, unlike a HTTP [[Header/EN|header]], the <meta> tag can be attacked more easily.
  
 
'''text/html; charset=utf-8''';
 
'''text/html; charset=utf-8''';
  
'''--snip'''
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></pre>
 
 
<pre><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></pre>
 
 
 
'''—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 [https://www.w3.org/International/articles/http-charset/index.de W3.org].
 
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 [https://www.w3.org/International/articles/http-charset/index.de W3.org].
  
Moreover, it is also possible to pass the correct charset information to the [http://httpd.apache.org/docs/2.0/howto/htaccess.html '''.htaccess'''] file, which will overwrite the declaration in the HTTP header. [https://www.w3.org/International/questions/qa-htaccess-charset charset in .htaccess]
+
Moreover, it is also possible to pass the correct charset information to the [http://httpd.apache.org/docs/2.0/howto/htaccess.html '''.htaccess'''] file, which will overwrite the declaration in the HTTP [[Header/EN|header]]. [https://www.w3.org/International/questions/qa-htaccess-charset charset in .htaccess]
  
 
'''Enter in the .htaccess file:'''
 
'''Enter in the .htaccess file:'''
<pre>AddType 'text/html; charset=UTF-8' html</pre>
+
AddType 'text/html; charset=UTF-8' html
  
 
Here is an example of an .htaccess file which will set the '''Header Scanner''' to green.
 
Here is an example of an .htaccess file which will set the '''Header Scanner''' to green.
([[Htaccess|.htaccess example (German only)]])
+
([[Htaccess/EN|.htaccess example]])

Aktuelle Version vom 8. April 2019, 08:53 Uhr

If the content type declaration is not configured correctly, your website is probably vulnerable to attacks.

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;

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

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 Header Scanner to green. (.htaccess example)