2
我想執行一個簡單的URLRewriting。如果你訪問azamsharp.com它將採取一些文件夾瀏覽結構,它應該去http://www.azamsharp.com/AzamSharpWebApps/Default.aspx。URLRewrite IIS 7
我不希望看到AzamSharpWebApps在URL:這裏是我使用的URL重寫:
<system.webServer>
<rewrite>
<rules>
<rule name="Virtual Director" enabled="true" stopProcessing="false">
<match url=".*" />
<conditions>
<add input="{MyDomains:{HTTP_HOST}}" pattern="(.+)" />
</conditions>
<action type="Rewrite" url="{C:1}{REQUEST_URI}" />
</rule>
</rules>
<rewriteMaps>
<rewriteMap name="MyDomains">
<add key="azamsharp.com" value="/AzamSharpWebApps/default.aspx" />
<add key="www.azamsharp.com" value="/AzamSharpWebApps/default.aspx" />
</rewriteMap>
</rewriteMaps>
</rewrite>
</system.webServer>
沒有人有答案! – azamsharp 2010-07-12 14:39:43