Response.RedirectPermanent 是否自动传递查询字符串变量?

发布于 2024-12-25 05:04:14 字数 155 浏览 3 评论 0原文

我已经用谷歌搜索到死亡,但无济于事。我有一个我们不想再使用的页面,但是,根据它的调用方式,我想传递查询字符串(如果有)。我编写了一些丑陋的代码来添加查询字符串(如果有),但如果 R​​esponse.RedirectPermanent 已经这样做了,那么我可以跳过该步骤。微软网站并不清楚。谢谢。

I have googled to death this to no avail. I have a page that we no longer want to use, however, dpending on how it was called, I want to pass the querystring along if there is one. I wrote some ugly code to add the querystring if there is one, but if the Response.RedirectPermanent already does it then I could skip that step. The microsoft web site is not clear. Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一袭水袖舞倾城 2025-01-01 05:04:14

301 重定向将重定向到您传入 RedirectPermanent 的任何内容,正是如此。它不会将当前查询字符串重新附加到您重定向到的内容。

A 301 redirect will redirect to whatever you pass into RedirectPermanent, exactly that. It will not re-append the curent query string to what you are redirecting to.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文