Changing the "PURL Not Found" Error

If a person visits a PURL that does not exist, they will be created with a somewhat ugly "PURL Not Found" error.  You can, however, change this to be whatever you would like.

If you are using  instantPURL to host your landing page on our server, you'll need to first request FTP access.

1. Locate the index.php File

Login to your server via FTP and locate the index.php file located in thepurlpage_yourcampaignname folder.  (yourcampaignname will obviously be your campaign name).

Need help with this step? Email us

2. Update the Error Message

If you open the index.php file, you will notice some PHP "PURL CODE" at the top of the file that looks similar to this:

$data = @file_get_contents(''.$_GET["ID"].'&name='.$_GET["name"].'&page='.$_GET["page"].'&qr='.$_GET["qr"].'&mobile='.$mobile.'&test='.$_GET["test"].''); if(empty($data)) { echo 'PURL Not Found'; exit; } $visitor = json_decode($data); /*Begin Campaign Redirect*/if($visitor->{'purlpage'} && (stristr($_SERVER['REQUEST_URI'], $visitor->{'purlpage'})) === FALSE) { header('Location: '.$visitor->{'url'}.'/'.$visitor->{'purlpage'}.'?ID='.$_GET["ID"].'&name='.$_GET["name"].'&page='.$_GET["page"].'&test='.$_GET["test"]); } /*End Campaign Redirect*/ @session_start(); if($_GET['username']) $_SESSION['visitor']=$_GET['username']; if($visitor->{'login'} && ($_SESSION['visitor'] != $visitor->{'firstName'}.''.$visitor->{'lastName'})) { echo $visitor->{'login'}; exit; }

Near the second line (in bold above) you'll notice echo 'PURL Not Found'

All you need to do is replace the words PURL Not Found with the text that you would like to appear.

Save & Upload

Once you made the change, save and upload the file back up to the server. The new error message will now be displayed when a person types in the wrong url. 

If you need help with any of this, you can email us