如何让 Http压缩 (GZip) 与 IIS 6 上的 URL 路由(无扩展 URL)配合使用

发布于 2024-07-23 05:22:06 字数 146 浏览 5 评论 0原文

好的,

URL 路由很棒。 无扩展 URL、SEO 友好等。但是,IIS 6 似乎不会对使用无扩展 URL 的站点执行压缩。

启用通配符映射后,Asp.Net 可以处理无扩展名文件,但是有什么方法可以将这些资源设置为 gzip 压缩吗?

Okay,

URL Routing is great. Extensionless URLS, SEO friendly etc. However, it seems that IIS 6 doesn't perform compression on sites that use Extensionless URLs.

WildCard Mapping is on so Asp.Net can process the extensionless files, but is there any way to set these resources to be gzipped?

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

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

发布评论

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

评论(1

ペ泪落弦音 2024-07-30 05:22:06

也许以下产品可能有用: Port80's httpZip

免责声明:我还没有尝试过该产品,并且与该公司没有任何隶属关系。 在我了解到 IIS6 内置的压缩​​功能并非易事后,我一直在关注这一问题,以防带宽成本飞涨。

httpZip 常见问题解答页面之一指出:
“通过 MIME 类型控制压缩:IIS 6.0 内置压缩使用文件扩展名和/或位置来确定文件是否应该压缩。如果您需要通过 MIME 控制 HTTP 压缩(例如,如果您有一个应用程序) (例如 ASP 或使用不同 MIME 输出内容的 ISAPI 过滤器),httpZip 按 MIME 类型进行压缩的精细控制是在 IIS 6.0 上实现此目的的唯一方法。”

为了解决 JackM 评论中提出的观点,该产品的其中一个声明(在上面的第一个链接中)是“通过实时浏览器兼容性检查确保完美解压。[...然后后来...] Windows Server 2003 上的 IIS 6.0 :Web 服务器中内置了强大的压缩引擎,但存在致命缺陷 - 它缺乏浏览器兼容性检查。”

Perhaps the following product may be useful: Port80's httpZip

Disclaimer: I haven't tried the product, and don't have any affiliation with the company. I've simply been keeping it on my radar in case bandwidth costs ever went through the roof, after I learned IIS6 built in compression wasn't the bees knees.

One of the httpZip FAQ pages states:
"Controlling compression by MIME type: IIS 6.0 built-in compression uses the file extension and/or location to determine whether a file should be compressed or not. If you need to control HTTP compression by MIME (for example, if you have an application file like ASP or an ISAPI filter that is outputting content with different MIMEs), httpZip's granular controls for compression by MIME type are the only way to accomplish this on IIS 6.0."

To address the point raised in JackM's comment, one of the product's claims (at the first link above) is "Flawless decompression ensured by real-time browser compatibility checking. [... then later ...] IIS 6.0 on Windows Server 2003: A robust compression engine is built into the Web server, but suffers from a fatal flaw – it lacks browser compatibility checking."

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