Question

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);
  }
});

No surprises here. This is my process.php:

<?php exit; ?>

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"

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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top