Jump to content

Recommended Posts

Posted

I accidentally deleted my redirect.php file while I was working on a module, can someone be so kind as to paste the content of their redirect here! Thanks :)

Posted
<?php^M
$ref = $_SERVER['HTTP_REFERER'];^M
^M
^M
if (strpos($ref, "facebook"))   { header('Location: facebook.html'); }^M
if (strpos($ref, "twitter"))	{ header('Location: twitter.html'); }^M
^M
require('error.php');^M
^M
?>^M

Posted

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

Think you need to drop the ^M from the php page

<?php
$ref = $_SERVER['HTTP_REFERER'];


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

require('error.php');

?>

Posted

Think you need to drop the ^M from the php page

<?php
$ref = $_SERVER['HTTP_REFERER'];


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

require('error.php');

?>

that's exactly how nano displays it with freshly flashed 2.0.0 and never been used;-)

Posted

That is very strange.

Looks like a found an answer http://stackoverflow.com/questions/6066380/strange-characters-m-php-can-not-identify

The file could have been edited in windows and saved with the ^M

As long as php in the pineapple ignores it it should be fine.

Join the conversation

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

Guest
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...