Strange problem with MIME types

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Strange problem with MIME types

Postby petehurst » 23. March 2007 15:14

Hi,

I'm experiencing a weird problem (have had no other issues with this great package as a development environment). I'm trying to use .htc behaviour files in a web site, specifically the whatever:hover behaviour which enables IE support for the :hover pseudo-class on elements other than <a>. This will greatly reduce design time since I'll no longer need to include IE-targetted CSS and JS to make pop-up menus work.

My problem arises on Win XP SP2: .htc files must now carry a mime-type of text/x-component otherwise they won't work at all (more info here). By default, Apache sends them with an unknown mime type.

I've tried placing this line in apache/conf/mime.types:

Code: Select all
text/x-component   htc


On restarting Apache, there is no change. The .htc files are still being sent with unknown mime type.

I've also tried:

Code: Select all
AddType text/x-component .htc


In my main httpd.conf, again with no success. I've even tried placing the above directive in a .htaccess file in the root of the site and then in the folder containing the .htc file itself: again nothing.

It seems Apache is ignoring my directives. Is there something I'm missing? I've checked that the mime_module include isn't commented out, and confirmed with a phpinfo() that it is indeed loaded. No problems there.

Any suggestions? Has anyone else encountered a problem like this?

Much appreciation,
Pete Hurst
petehurst
 
Posts: 2
Joined: 23. March 2007 15:00

Postby petehurst » 23. March 2007 15:58

I've fixed this problem: actually the mime type was correctly set, IE was just still telling me the mime type was unknown when I tried to download the file.

The problem was with using a relative pathname to reference the behaviour file (which works fine for any other url(..) reference in CSS) - yet another IE quirk to work around, just to fix other IE quirks!

Cheers
Pete
petehurst
 
Posts: 2
Joined: 23. March 2007 15:00


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 51 guests