【问题标题】:Context.RewritePath changes Request.Url.AbsolutePath value. Can it be different?Context.RewritePath 更改 Request.Url.AbsolutePath 值。可以不一样吗?
【发布时间】:2012-03-07 00:30:30
【问题描述】:

我正在使用 asp.net MVC 3,当我重写一个 url 时,我需要获取以前的 url 值。有可能吗?

【问题讨论】:

    标签: c# asp.net asp.net-mvc-3 rewrite


    【解决方案1】:

    用户Request.UrlReferrer.PathAndQuery.ToString()获取上一个URL

    【讨论】:

    • 不正确 - 重写与服务器端在同一请求上下文中。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-10-15
    • 2010-10-08
    • 1970-01-01
    • 2016-05-22
    • 2012-01-11
    • 1970-01-01
    • 2023-02-03
    相关资源
    最近更新 更多