views:

133

answers:

1

I'm using:

ForceType text/html;charset=utf-8

in my .htaccess file, but it's causing all externally linked CSS to stop rendering on their respective pages.

So something like this:

<link rel="stylesheet" type="text/css" href="somestyles.css" media="all" />

no longer works on the page using it.

I've also been trying combinations of:

AddCharset utf-8 .html
AddCharset utf-8 .htm
AddCharset utf-8 .css
AddCharset utf-8 .js
ForceType text/html;charset=utf-8
ForceType text/css;charset=utf-8

but no luck so far. Does anyone know what's wrong?

A: 

This works for me on my web host (in my root .htaccess):

#for html, php
AddDefaultCharset UTF-8
#for css, js
AddType 'text/css; charset=UTF-8' css
AddType 'application/x-javascript; charset=UTF-8' js

I'm not sure, but I think the ForceType may be telling the browser that the css file is html, not css.

Slashback