Jump to content

Help With Redirect.php


Recommended Posts

Just wondered if anyone whos got this working can give me any tips.

I have pineapple mk4.

dns spoofing is turned on.

Dns spoof config = example.com

landing page config=



<meta http-equiv="REFRESH" content="0;url=redirect.php">





redirect.php =



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



default.html just has text default, and example.html just has text hello

when i goto example.com from a browser it redirect me to:


and brings up the text from default.html :(

So its not redirecting to example.html

Can anyone help??

Link to comment
Share on other sites

How bazaar!!

I SSHed into the pineapple and found in the configs the symbol " had been replaced with ...

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

was actually

if (strpos($ref, ...example...)){ header('Location: example.html'); } so it didnt work.

All fixed. sorry about that.

Link to comment
Share on other sites

never mind i figured it out.... it was the redirect.php that was causing me problems. I posted the revised php:

$ref = "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
if (strpos($ref, "example")) { header('Location: example.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...