Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Why does it not work?
I want to warn people that a directory is being modified and re-direct them to another page, telling them to come back later.
I'm doing this by putting a file called "locked_y.txt" in the directory then checking with this...
Why do I get this error...
The page isn't redirecting properly
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
I'm doing this by putting a file called "locked_y.txt" in the directory then checking with this...
<?php
$filename = "locked_y.txt";
if (file_exists($filename)) {
header("Location: otherpage.php");
exit;
} else {
exit;
}
?>
Why do I get this error...
The page isn't redirecting properly
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
Posted: Thursday, 31 May 2007 at 3:01PM
0
This discussion has been closed.
Comments
I don't see what is so different but this now works...
<?php $filename = 'locked_y.txt'; if (file_exists($filename)) { header("Location: otherpage.php"); exit; } else { echo""; }
Is there a better way to tell PHP do do nothing besides echo ""?
Posted: Thursday, 31 May 2007 at 4:33PM
If I enter a full URL it tells me it does not have the permissions to access it, or words to that effect.
Posted: Thursday, 31 May 2007 at 8:59PM
But yes, that's my name.
@ Wanderer: Did you get it working? Dinoboff is pretty much right that the header response should be a full URL, unless you're attempting an absolute path on the file system which would obviously be saying you can't access it otherwise it would just say "404 - oops". Unless of course you're actually wanting an inclusion and not a redirect/refresh. See http://www.php.net/header
The problem was not the file not being found, it was some sort of recursion according to the error messages from both Firefox and Safari.
I used a relative path because the function was an include and referred to a file of the same name but different directories, depending on where it was called from.
Posted: Saturday, 2 June 2007 at 3:46PM