[英]I get a 403 error when submitting “http://www.” via GET. Even if it's encoded beforehand. Is there a solution for this?
It seems like my shared host provider is detecting the presence of "http://www" or "http%3A%2F%2Fwww" in any get request and serving up a 403 page. 似乎我的共享主机提供商正在检测任何获取请求中是否存在“ http:// www”或“ http%3A%2F%2Fwww”并提供403页。
I also get an 'in addition' error... 我还会收到“其他”错误...
"Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request." “此外,尝试使用ErrorDocument来处理请求时遇到了404 Not Found错误。”
This only happens with this string. 仅此字符串会发生这种情况。 If I change it to something else the get is successfully submitted and the target page successfully returned. 如果我将其更改为其他内容,则会成功提交get并成功返回目标页面。
If it helps I'm writing a QR code getter, so the ability to submit urls is quite important. 如果可以帮助我编写QR码获取程序,那么提交URL的功能就非常重要。
Also, strangely I can submit a url as long as it doesn't have 'www' in it. 另外,奇怪的是,我可以提交一个URL,只要其中没有'www'。 I can also submit 'www' as long as it isn't preceded by 'http://' (or the encoded version) 我也可以提交“ www”,只要它前面没有“ http://”(或编码版本)
edit: Just to confirm this wasn't a specific problem with the page I was writing, I went to another page on my website that uses get request and manually inserted the string. 编辑:只是为了确认这不是我正在编写的页面的特定问题,我转到了网站上使用get请求并手动插入字符串的另一个页面。 This also generates the 403 error. 这也会生成403错误。
Yes -- there are two solutions: 是的-有两种解决方案:
Replace any instances of http://www.
替换http://www.
所有实例http://www.
with StackOverflowRulez
and in your PHP have it replace the $_GET
StackOverflowRulez
with http://www.
使用StackOverflowRulez
并在您的PHP中将$_GET
StackOverflowRulez
替换为http://www.
. 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.