Redirecting Facebook Ads

Yes, this is doable. You can two it two ways, you can either wait until the devs have reviewed your ad and approved it then redirect it to your offer that facebook isn't approving.

Or just run this cloaking script.

PHP:
<?php
  $cloaked_url = "URL"; // devs go here
  $normal_url = "URL";  // everyone else goes here

  $tracking_ref = $_SERVER['HTTP_REFERER'];

  if(strpos($tracking_ref,"dev.facebook")){
    Header( "HTTP/1.1 301 Moved Permanently" );
    Header( "Location: " . $cloaked_url );
  } else {
    Header( "HTTP/1.1 301 Moved Permanently" );
    Header( "Location: " . $normal_url );
  }
?>
(remove any white space outside of the PHP tags to avoid errors)
 
Back
Top