返回307临时重定向在ASP.NET MVC [英] Return 307 Temporary Redirect in ASP.NET MVC

查看:142
本文介绍了返回307临时重定向在ASP.NET MVC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能返回一个 307临时重定向在ASP.NET MVC控制器?

Is it possible to return a 307 Temporary Redirect from a controller in ASP.NET MVC?

我的有时的需要重新 - POST 从一种形式提交到另一个URI值

I sometimes need to re-POST the values submitted from one form to another URI.

使用JavaScript做在客户端(从而绕过这个问题)的选择是不是一种选择。

Using JavaScript to do the selection on the client side (thereby bypassing this issue) is not an option.

通过重定向 GET 是不是一种选择,因为公布的数据包括8K的字符串,它很可能意味着该URI就太长了一些(很多?)浏览器

Redirecting via a GET is not an option as posted data includes an 8k string which is likely to mean that the URI would be too long for some (many?) browsers.

这甚至可能吗?

推荐答案

看看下面的文章 - 你可以使用相同的307技术:

Take a look at the following article - you can use the same technique for 307:

301重定向

这篇关于返回307临时重定向在ASP.NET MVC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆