Jump to content

[Added/fixed][Suggestion] Dnsspoof Redirect.php Fix


Neworld

Recommended Posts

Fixed the redirect.php copy and replace. :D


<?php
$ref = "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];

if (strpos($ref, "example")) { header('Location: example.html'); }

?>
[/CODE]

Report feedback and issues.

Link to comment
Share on other sites

Fixed the redirect.php copy and replace. :D


<?php
$ref = "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];

if (strpos($ref, "example")) { header('Location: example.html'); }

?>
[/CODE]

Report feedback and issues.

Im confused, what needed fixing? this thread should be moved to bugs and suggestions

Link to comment
Share on other sites

Fixed the redirect.php copy and replace. :D


<?php
$ref = "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];

if (strpos($ref, "example")) { header('Location: example.html'); }

?>
[/CODE]

Report feedback and issues.

What is this supposed to fix?

(Future reference, just report it and give a reason like "Post in the wrong thread")

*Moved*

Link to comment
Share on other sites

This is less of a fix than a different way to do the same thing. And it removed the error.php require.


<?php
$ref = $_SERVER['HTTP_REFERER'];
if (strpos($ref, "example")){
header('Location: example.html');
}
require('error.php');
?>
[/CODE]

This is the code we have in the current / next build.

As you can see it uses the $ref to see if the word example is found in that string.

So having http://example.com or example.com or example will all give the same result. There is no need to include the rest, as far as I know anyway.

This works for me so I am unsure what is meant to be accomplished.

If you can clarify I am happy to include this.

Link to comment
Share on other sites

there were issues in the redirect file where it would get stuck on redirect.php and continuously loop refreshing the php without ever going to the .html.

The if statement wasn't getting the url from the address bar, and the error.php was refreshing.

I don't know if it was just me with the issue or not, but I thought it was important to post. :D

Link to comment
Share on other sites

  • 4 weeks later...
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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