Linux server, have text/css css in mime.types, even went as far as AddType text/css .css in httpd.conf. None of it fixed it.
This is a scheme I use often and have never encountered this. I have this document that needs different links based on browser. Easy enough, put a placeholder for the links, when requested an .htaccess directive rewrites to a script that determines the browser, opens the file, subs out the right links, then does
print "content-type:text/html\n\n";
print "$the_page";
Well enough . . . except I get the "css was not loaded because it's MIME type, "text/html", is not "text/css".
I don't get it. I know my script is overwriting the mime type somehow, but it outputs
<link rel="stylesheet" type="text/css" href="/path/to/style.css" />
As part of the page output, and doesn't even request the style sheet until the script exits. General structure,
/cgi-bin
/httpdocs
/httpdocs/pagedirectory
In .htacess at root (httpdocs)
RewriteRule ^pagedirectory\/([^/]*)\/*(.*) /cgi-bin/page-parser.cgi?d=$1&p=$2 [L]
(Typical structure might be /pagedirectory/layoutdirectory/index.html)
A further verification it's something to do with the script is that if I remove the rewrite, go directly to the file, it's fine. Well, all except for the placeholders for the links. :-P
Output validates to XHTML strict.
CSS validates to 2.1 without warnings.
As I've said, I've used this before, many times, open a template and output text/html . . . CSS has always linked fine. What can I be missing?