Page 1 of 1

Redirect IP Ban Landing Page

Posted: Mon Jun 11, 2012 7:36 am
by AndyF
Script URL: www.thefletchers.co.uk/guestbook/
Version of script: 1.7
Hosting company: 1and1
URL of phpinfo.php: www.thefletchers.co.uk/guestbook/phpinfo.php
URL of session_test.php: www.thefletchers.co.uk/guestbook/session_text.txt
What terms did you try when SEARCHING for a solution: IP ban redirect, Ip ban landing page redirect etc

Write your message below:
rather than display the "ERROR - YOU ARE BARRED" message to everyone that has their IP barred, is there a way I can redirect to a different URL instead. I have found the entry in language.ini.php, but my knowledge of this type of programming is VERY limited !!

Re: Redirect IP Ban Landing Page

Posted: Mon Jun 11, 2012 2:14 pm
by Klemen
Open gbook.php in a plain text editor such as Notepad and try modifying this code:

Code: Select all

die($lang['e21']);
to

Code: Select all

header('Location: http://www.yourwebsite.com'); exit();
Must be done twice in the gbook.php file and of course change the website URL in the code to your own URL.

Re: Redirect IP Ban Landing Page

Posted: Mon Jun 11, 2012 2:44 pm
by AndyF
Thank you - works like a charm.

I'm off now to buy the program as my way of saying thanks