jQuery的AJAX请求失败,503错误只与QUOT; HTTP://example.com"作为价值 [英] jQuery AJAX request fails with 503 error only with "http://example.com" as value
问题描述
我有奇怪的问题。这是我的javascript:
I have the strangest problem. This is my javascript:
var value = "some_value";
$.ajax({
url: "process.php",
type: "POST",
dataType: "json",
data: {
value: value
},
success: function(data) {
console.log(data);
}
});
没有惊喜。这是我的process.php:
No surprises here. This is my process.php:
<?php exit; ?>
其实这并不重要,什么是 process.php
里面。
该请求是成功的,每次,除非值是一个有效的URL。随着
Actually it does not matter, what is inside the process.php
.
The request is successful everytime, except when value is a valid URL. With
var value = "http://example.com"
在开始请求时,按照错误503服务暂时不可用失败。 什么是错我的服务器配置?我不知道什么尝试。 我没有任何的.htaccess。浏览器:Firefox的29
at the beginning the request will fail with error 503 Service temporarily unavailable. What is wrong with my server configuration? I don't know what to try. I have no .htaccess. Browser: Firefox 29.
推荐答案
这是几乎可以肯定,一个网应用防火墙。检查服务器是否正在运行 的mod_security
。您将需要查看使用的mod_security
或任何其他的服务器上运行的规则,以找到一个被阻止的URL。
This is almost certainly a web application firewall. Check whether your server is running mod_security
. You will need to review the rules used by mod_security
or whatever else is running on the server to find the one that is blocking URLs.
这篇关于jQuery的AJAX请求失败,503错误只与QUOT; HTTP://example.com"作为价值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!