Code Snippet </> Info
Snippet Name: Force Correct content-type for XHTML Documents
Description: Most webservers serve XHTML content as TEXT/HTML which is definitely the right way to handle XHTML documents. In case the server isn't doing that correctly, you can force it on Apache servers with your .htaccess file.
Note:
Author:
Last Modified: 2015-03-26 23:29:16
Language: .htaccess
Highlight Mode: html
|
Copy Codes: Use Free Notepad ++ |
|
Snap HTML Code Editor: Paste the source code, make changes and instantly see it in live preview. Snap HTML Code Editor
|
|
Copied To Clipboard!
RewriteEngine On
RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml
RewriteCond %{HTTP_ACCEPT} !application/xhtml\+xml\s*;\s*q=0
RewriteCond %{REQUEST_URI} \.html$
RewriteCond %{THE_REQUEST} HTTP/1\.1
RewriteRule .* - "[T=application/xhtml+xml; charset=ISO-8859-1]"
|