IIS 6 使用通配符应用程序映射时压缩静态文件

发布于 2024-07-09 01:24:23 字数 190 浏览 5 评论 0原文

我将 IIS 6 与 EPiserver CMS 一起使用,它要求所有请求都通过 aspnet_isapi.dll。

我想对所有静态文件(主要是 js、css)进行 gzip 压缩。 尝试在 IIS 中设置压缩不起作用。

EPiServer 中是否有一个设置可以让我实现这一目标? .net框架可以自动压缩文件吗?

I'm using IIS 6 with EPiserver CMS which requires all requests to go through aspnet_isapi.dll.

I want to gzip all my static files (js, css mainly). Trying to setup compression in IIS didn't work.

Is there a setting in EPiServer that will allow me to achieve this?
Can .net framework compress files automatically?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

凉城已无爱 2024-07-16 01:24:23

您需要在 IIS 元数据库中将 html 扩展配置为动态压缩扩展。 您可能将其视为静态页面。 如果 .js 和 .css 扩展名映射到 aspnet_isapi,它们将被视为动态页面。

metabase.xml 中的设置 应该如下所示:

HcScriptFileExtensions="asp
dll 
exe 
js
css"

如果您之前在 HcFileExtensions(对于静态文件)中插入了扩展名,请不要忘记将其删除。

希望这有帮助。

You'll need to configure the html extension in the IIS metabase as a dynamically compressed extension. You are probably treating it as a static page. If the .js and .css extensions are mapped to aspnet_isapi they are considered as dynamic pages.

The setting in metabase.xml should look like this:

HcScriptFileExtensions="asp
dll 
exe 
js
css"

Don't forget to remove the extensions from HcFileExtensions (for static files) if you inserted them there before.

Hope this helps.

三生殊途 2024-07-16 01:24:23

如果您想对所有文件进行 gzip 压缩(以便在具有无扩展名 URL 的 Web 服务中使用)怎么办?

What if you wanted to gzip all files (for use in a web service with extensionless URLs)?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文