Mobile app version of vmapp.org
Login or Join
Fox8124981

: Setting The Right Website MIME Type? I have been testing my project using the W3C Validation tool and it passes 100% with no errors and just 1 warning - XHTML 1.0 Transitional. Warning -

@Fox8124981

Posted in: #Xhtml

I have been testing my project using the W3C Validation tool and it passes 100% with no errors and just 1 warning - XHTML 1.0 Transitional.

Warning - Conflict between Mime Type and Document Type


After some research I can find tons of definitions of the various MIME types, so the correct one for my project is 'application/xhtml+xml'.

But, where does it go - is it part of the DTD?

What other code do I need as this doesn't look complete on it's own?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Fox8124981

1 Comments

Sorted by latest first Latest Oldest Best

 

@Kaufman445

Usually you set mime-types for different types of "files" which are passed from your server to the receiver.

In Apache you would add the following lines to your .htaccess file (in your root directory):

AddType application/xhtml+xml .xhtml .xht


You'd add the file's extension to whatever you'd want to transfer with that mimetype. Be it .xhtml, .xht, .html, .php or whatever.

See Configuring MIME Types in .htaccess and Mod MIME under AddType Directive

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme