Need a way to post a url to facebook than will display html in the preview and then redirect to a page. The problem is that I also have a php tag that I need to pass.
Right now I'm using a normal 301 header redirect but then you cant output any html. As a result, the facebook preview of the link/page looks blank. So what I want to do is have some html output for facebook to pick up and display and interrogate what is in $search if there is anything and then redirect based on that.
<?php
$search=urlencode($_GET['search']);
if ( $search == "" )
{
$redirectlink="http://mylink";
}
else
{
$redirectlink="http://mylink$search";
}
header("Location: $redirectlink", true, 301);
exit;
?>