【发布时间】:2014-05-07 01:12:16
【问题描述】:
目前我正在尝试获取浏览器中显示的当前 URL。
如果我使用
Request.Path
我得到https://this.website.com:443/Default.aspx,这在技术上是正确的。
但是浏览器本身显示的 URL 是https://this.website.com/。
使用任何请求选项仍将显示 Default.aspx。
我需要最终检测浏览器中的 url 是 https://this.website.com 还是 http://this.website.com/Default.aspx,如果不存在则重定向到 Default.aspx。
顺便说一句,更复杂的是我的 web.config 中的 https 重定向。
【问题讨论】:
-
这不是重复的问题。我想弄清楚的是如何区分site.com 和site.com/Default.aspx 之间的区别。这显然 asp.net 确定是相同的。