IIS7和强制使用小写网址 [英] IIS7 and Enforce lowercase URLs

查看:82
本文介绍了IIS7和强制使用小写网址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试在iis7 Enforce小写URL中使用选项,但是当我启用它时,所有带有* .JPG扩展名(大写)的图像都将停止服务器.在iis的上一版本中,使用大写和小写形式都可以,它返回了相同的源代码

I tried to use option in iis7 Enforce lowercase URLs, but when i enabled it all images that had *.JPG extension (uppercase) stopped server. in prev version of iis it was ok when using upper and lower cases, it returned same source

我可以解决它吗?还是我应该为每个扩展名(例如jpeg,jpg,gif ...)创建规则

may i fix it? or should i create rule for each extension like (jpeg, jpg, gif...)

推荐答案

我刚刚从Scott Scott那里读了一篇有关编写规则的文章

I was just reading an article on writing rules, from Scott Gu

他讨论了从小写重写中排除静态文件(.jpeg,.jpg,.gif等)的问题,并展示了如何添加条件以排除文件.在另一篇文章中,我找到了排除斯科特例子之外的条件的条件

He talks about the issue of excluding static files (.jpeg, .jpg, .gif, etc.) from the lowercase rewrite, and shows how you can add conditions to exclude files. Another article is where I found the condition for excluding more than just Scott's example

迈克的Umbraco博客-URL重写和SEO

他添加了条件:

<add input="{URL}" pattern="^.*\.(axd|css|js|jpg|jpeg|png|gif)$" negate="true" ignoreCase="true" />

我希望这会在以后的重写中为您提供帮助.

I hope this helps you in future rewrites.

这篇关于IIS7和强制使用小写网址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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