关于重定向为POST [英] About Redirect as POST

查看:115
本文介绍了关于重定向为POST的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将用户重定向到其他网站中的某个url,但是要用他的重定向发送一些post变量..这可能吗?如果可以,怎么办?

I want to redirect the user to some url in other website, but to send with his redirect some post variable.. is this possible? And if yes, how?

谢谢.

推荐答案

不是. :(

不过,您可以使用Javascript提交隐藏表单.

You can however submit an hidden form using Javascript.

编辑:可耻的是我.似乎可以不用Java来实现.尝试将一些数据发布到您自己编写的PHP页面上,这基本上告诉浏览器执行303 See Other重定向.从浏览器应该在重定向目标上重新发布数据的角度来看,它应该起作用,但是有人报告这会导致浏览器显示确实重新发布数据?".消息,就像您刷新用POST加载的网页时看到的消息.

EDIT: shame upon me. It seems it can be achieved w/o Javascript. Try to post some data to a PHP page you write yourself, which basically tells the browser to do a 303 See Other redirect. It shall work, in the sense that the browser should re-POST the data on the redirection target, but someone reports this causes the browser to show a "really repost the data?" message, like the one you see if you refresh a web page you loaded with a POST.

但是,即使它可行,我认为也没有人这样做.

However, even if it works, I think nobody does it.

这篇关于关于重定向为POST的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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