Find URL for 403 error page
-
I’m trying to implement a php script which will refer visitors fr. a banned domain to an error page. The script asks for the URL of the error pg. you wish to invoke. I’d like to use my 403 error pg. but I have no idea what URL to use. Any ideas?
Here’s the script:
<?php
$urls[0]='http://www.domainreferring.com/page';
$urls[1]='http://domainaddressagainwithoutwww.com/page';
$ref=strtolower($_SERVER['HTTP_REFERER']);
$url='http://www.yourdomain.com/or where youwant themtogo.html';
if(!in_array($ref, $urls)){
header('Location: '.$url);
}
?>I prob. don’t need to use any error pg. since I don’t want them at the site & don’t really need to tell them anything about why they were prevented fr. accessing it. In that case, can I remove the line that starts ‘$url…’?
BTW, can anyone find anything in this script that might be causing major screw ups for me when I add it to my header.php file?
- The topic ‘Find URL for 403 error page’ is closed to new replies.