There are 4 domains on the server, each directing to their associated directories.
Everything is working fine except for a very strange PHP behavior, if a script is performing some task and after it is finished with the task needs to redirect back to the first script, an infinite redirection occurs.
I have made a couple of tests to get a better picture. First is a simple javascript redirecting. File send_request.html has a link to call the file recieve_request.html which has the simple javascript:
Code: Select all
<script type="text/javascript">
window.location = "send_request.html"
</script>
A similar test was made for the PHP case. recieve_request.php has the following:
Code: Select all
<?php
$redirect = "send_request.php?a";
if (isset($_SERVER['QUERY_STRING'])) {
$redirect .= (strpos($redirect, '?')) ? "&" : "?";
$redirect .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $redirect));
?>
Checking the server logs did not show anything, even at the time of running the scripts.
Any suggestions would be much appreciated!