Redirect IP Ban Landing Page

Dr. GBooky is here to help you with your guestbook problems ...
Post Reply
AndyF
Posts: 10
Joined: Thu Jun 07, 2012 3:55 pm

Redirect IP Ban Landing Page

Post 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 !!
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Re: Redirect IP Ban Landing Page

Post 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.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
AndyF
Posts: 10
Joined: Thu Jun 07, 2012 3:55 pm

Re: Redirect IP Ban Landing Page

Post by AndyF »

Thank you - works like a charm.

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