如何配置.htc文件在nginx上工作 [英] how to configure .htc files to work on nginx

查看:383
本文介绍了如何配置.htc文件在nginx上工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在< = IE8上运行圆角,使用border-radius.htc找到这里。我在浏览器中运行了.htc文件的URL,我可以查看代码,以便我的路径在css文件中是正确的。我使用nginx托管我的网页。



有没有人知道我可以如何运行这个文件以使样式在< IE9?我已阅读这里有关.htc扩展名的 MIME 类型,但我不知道该怎么做nginx或者甚至 MIME 类型是问题。如果有一些其他方式来获得圆角,而不使用.htc文件,我也乐意尝试该解决方案。感谢。

解决方案

我找到了答案,此解决方案



评论者:mjijackson@gmail.com,2009年10月15日 b

如果你使用nginx,指令几乎是一样的。打开/etc/nginx/mime.types并在你的类型{}声明中添加以下三行(在最近的nginx版本中,他们已经存在):

  text / x-component htc; 
application / x-shockwave-flash swf;
image / svg + xml svg;


I'm trying to run rounded corners on <= IE8 using border-radius.htc located here. I've run the URL to the .htc file in my browser, and I can view the code so my path is correct in the css file. I'm using nginx to host my webpages.

Does anyone know how I can get this file to run so that the styling works in < IE9? I've read some here about MIME types for .htc extensions, but I don't know what to do for nginx or even if MIME type is the issue. If there is some other way to get the rounded corners without using an .htc file, I'm open to try that solution as well. Thanks.

解决方案

I've found the answer, this solution. It's the 2nd post down on the thread.

Comment by mjijackson@gmail.com, Oct 15, 2009

The directives are almost identical if you're using nginx. Open /etc/nginx/mime.types and add the following three lines inside your types {}declaration (in recent versions of nginx they're already there):

text/x-component htc;
application/x-shockwave-flash swf;
image/svg+xml svg;

这篇关于如何配置.htc文件在nginx上工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆