[thelist] FilesMatch/ForceType leads to CSS death?

Dejan Kozina dejan at kozina.com
Sat Sep 10 10:20:58 CDT 2005


Firefox is not loading the css file because it doesn't find it where it 
thinks it should be. The nice URL tricks the browser into thinking it is 
currently in the news directory and your link to the css file makes it 
request '/trial/news/example.css', which gets parsed by your php script 
and results in a database error message within your template.
You can:
	1. change your css href to '../example.css'
or
	2. put <base href="http://www.example.com/trial/"> into your HEAD

Further, your server is sending the css as text/plain and Gecko browsers 
definitely don't like this. Add this line to your htaccess:
	AddType text/css .css

Hope this helps.

djn

Matt Warden wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Amanda Kuek wrote:
> 
>>Error: The stylesheet http://www.example.com/trial/news/example.css was
>>not loaded because its MIME type, "text/html", is not "text/css".
> 
> 
> Um, have you tried requesting your "css" file directly? It is
> definitely not a CSS file.
> 
> http://www.example.com/trial/news/example.css
> 
> - --
> Matt Warden
> Miami University
> Oxford, OH, USA
> http://mattwarden.com
> 
> 
> This email proudly and graciously contributes to entropy.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.4 (GNU/Linux)
> 
> iD8DBQFDIufNAQ0d4HGyPE8RAha0AKCAl7rcN6VVFUfJKUUQbel52M/iKgCfe0df
> LNCpo5ChO53nrDo70nhjq6E=
> =iu9c
> -----END PGP SIGNATURE-----

-- 
Dejan Kozina
Dolina 346 (TS) - I-34018 Italy
tel./fax: +39 040 228 436 - cell.: +39 348 7355 225
http://www.kozina.com/  - e-mail: dejan at kozina.com


More information about the thelist mailing list