大长查询字符串在临时服务器上工作正常,在生产服务器上返回 HTTP 406?

发布于 2024-11-11 00:15:40 字数 280 浏览 3 评论 0原文

我有一个 javascript 事件,应该将我带到另一个位置:

onclick="window.location.href='index.php?get=[a big long 550-character string]'"

这在我的机器上本地运行的 apache 上运行得很好,但是当我将脚本上传到我的虚拟主机时,此重定向在 IE 中返回 HTTP 406 NOT ACCEPTABLE,并且在 IE 中只是一个空白页面火狐。

我是否在某个地方缺少服务器配置?

I have a javascript event which is supposed to take me to another location:

onclick="window.location.href='index.php?get=[a big long 550-character string]'"

This works perfectly on apache running locally on my machine, but when I upload the script to my webhost this redirect returns HTTP 406 NOT ACCEPTABLE in IE and just a blank page in Firefox.

Is there a server configuration thing I'm missing somewhere?

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

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

发布评论

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

评论(1

遮了一弯 2024-11-18 00:15:40

检查服务器上正在处理的实际 URL。即:检查它是否被截断。我这样说是因为某些平台/配置只允许 URL 达到一定数量的字符。 通常 2048 以内的任何字符都可以,但某些平台可能会将其限制为 256 个字符。

此帖子可能有用:URL 的字符限制是多少

Check what actual URL is being processed on the server. I.e.: check if it is being truncated. I say this because certain platforms/configurations only allow URLs up to a certain number of characters. Usually anything upto 2048 is fine, but certain platforms may limit it to 256 characters.

This thread may be useful: What is the character limit on URL

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