如何使 URL 重写与 IIS7?
zh:如何使 URL 重写与 IIS7?
he:כיצד להפוך את ה-URL משכתב עם IIS7?
ro:Cum sa faci URL-ul rescrierea cu IIS7?
ru:Как сделать переписывания URL-адресов с IIS7?
pl:Jak zrobić URL Rewriting z IIS7?
ja:IIS7 を使用して URL 書き換えを作る方法?
ar:كيفية جعل إعادة كتابة URL مع IIS7؟
de:Wie URL-Rewriting mit IIS7 zu machen?
nl:Hoe maak URL herschrijven met IIS7?
it:Come fare la riscrittura degli URL con IIS7?
pt:Como fazer a regravação de URL com IIS7?
es:¿Cómo hacer las reescrituras de URL con IIS7?
en:How to make URL Rewriting with IIS7?
fr:Comment faire de l'URL Rewriting avec IIS7 ?
这篇文章是从由软件进行自动翻译。你可以看到这篇文章的源代码
问题
我有一个 Windows 主机 2008 服务器和 IIS 7 并愿 URL 重写如何 ?
解决方案
与 IIS 7住宿 Windows 看到一个新的功能,渴望,出现。 此功能不是别人比本身所支持的 URL 重写支持 服务器 IIS Web 7通过特定的模块。
重写规则是在 XML 文件中 Web.config web 站点。
下面是一个示例 XML 为 URL 重写 :
<重写 >
<rewriteMaps >
<rewriteMap 名称 ="Static重写 s ">
<添加密钥 ="/文章 1" 值 ="/article.aspx ?ID =1&title=一些标题 " />
<添加密钥 ="/一些标题 " 值 ="/article.aspx?ID =1&title=一些标题 " />
<添加 key="/post/some-title.html" 值 ="/article.aspx?ID =1&title=some-title" />
</rewriteMap>
</rewriteMaps>
<规则 >
<规则名称 ="重写规则 1 为 StaticRewrites " stopProcessing ="True ">
<match url=".*" />
<conditions>
<添加输入 ="{StaticRewrites:{并 }}" 模式 ="(.+)" />
</conditions>
<操作类型 ="Rewrite" url="{C:1}" appendQueryString ="假 "/>
</rule>
</rules>
</rewrite>
示例应用程序为 Wordpress : http://learn.iis.net/page.aspx/466/enabling-pretty-permalinks-in-wordpress/
更多的信息 : http://learn.iis.net/page.aspx/460/using-url-rewrite-module/
开启评论自动刷新