关于重定向为POST

关于重定向为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.