Asp.net 重写路径不会更改HttpContext.Current.Request

Asp.net 重写路径不会更改HttpContext.Current.Request,asp.net,url-rewriting,Asp.net,Url Rewriting,我有一个httpModule,它允许我拥有自定义url,但可以将url指向具有其他查询字符串信息的指定页面 假设我使用context.RewritePath将Custom/Path重写为a/Path.aspx?queryKey=value 当我尝试接收queryKey查询参数时,它不存在,因为Request.Path仍然是Custom/Path 如何将Request.Path设置为/Path.aspx?queryKey=value,以便获取查询字符串信息?如果需要返回一个目录,可以使用../Pa

我有一个httpModule,它允许我拥有自定义url,但可以将url指向具有其他查询字符串信息的指定页面

假设我使用context.RewritePath将Custom/Path重写为a/Path.aspx?queryKey=value

当我尝试接收queryKey查询参数时,它不存在,因为Request.Path仍然是Custom/Path


如何将Request.Path设置为/Path.aspx?queryKey=value,以便获取查询字符串信息?

如果需要返回一个目录,可以使用../Path.aspx?queryKey=value

此外,您可能希望为rebaseClientPath选项添加一个false