【发布时间】:2016-08-30 18:29:52
【问题描述】:
我需要为大量应用程序创建易于记忆的重定向到长且难以记忆的路径的 URL。
即 subdomain.domain.edu/shortname 重定向到 https://www.subdomain.domain.edu/mainApplication/subfolder/page
我在 IIS 8.5 中使用 URL 重写模块,但是当我浏览到短别名时,我不断收到 404。我知道重写模块正在工作,因为我使用它来处理将 HTTP 重写为 HTTPS 并将 WWW 添加到 URL。
我的重写规则如下:
<rewrite>
<rules>
<rule name="Easy to remember shortcut" stopProcessing="true">
<match url=".*subdomain.domain.edu/shortname" />
<conditions>
<add input="{URL}" pattern=".*/shortname" />
</conditions>
<action type="Redirect" url="https://www.subdomain.domain.edu/mainApplication/subfolder/page.aspx" />
</rule>
</rules>
</rewrite>
当然这会返回 404。有什么想法吗?
如果在另一篇文章中已经有这个问题的答案,请原谅我,但是,我已经通读并尝试了 30 多篇关于 URL 重写模块的文章,但还没有找到实际创建别名的解决方案。
【问题讨论】:
-
请检查我的答案,如果我错过了什么,请告诉我
标签: iis alias url-redirection