The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Redirect specific IP to different page
There is a user/site (they always the same IP address) that I want to return a Error 404 type page or a redirect to a different site or just a blank page - basically I don;t what them to see my site at all.
I imagine I would have to edit the GLobal.php file, but am not quite sure how or what to add in .. Any help appreciated! Thanks |
#2
|
|||
|
|||
Code:
vB 3.5.x: ACP -> Plugin System -> Plugin Manager -> Add New Plugin Product: vBulletin Hook Location: init_startup Title: 404 IP Address Plugin PHP Code: code is below Plugin is Active: Yes // Start 404 IP Address /***************************************************************** REMEMBER TO CHANGE xxx.xxx.xxx.xxx TO THE IP TO BLOCK *****************************************************************/ if (IPADDRESS == 'xxx.xxx.xxx.xxx' OR ALT_IP == 'xxx.xxx.xxx.xxx') { if (SAPI_NAME == 'cgi' OR SAPI_NAME == 'cgi-fcgi') { header("Status: 404 Not Found"); } else { header("HTTP/1.1 404 Not Found"); } die('HTTP/1.1 404 Not Found'); } // End 404 IP Address Code:
vB 3.0.x: at the end of includes/init.php right before ?> add: /***************************************************************** REMEMBER TO CHANGE xxx.xxx.xxx.xxx TO THE IP TO BLOCK *****************************************************************/ if (IPADDRESS == 'xxx.xxx.xxx.xxx' OR ALT_IP == 'xxx.xxx.xxx.xxx') { if (SAPI_NAME == 'cgi' OR SAPI_NAME == 'cgi-fcgi') { header("Status: 404 Not Found"); } else { header("HTTP/1.1 404 Not Found"); } die('HTTP/1.1 404 Not Found'); } |
#3
|
||||
|
||||
Quote:
|
#4
|
|||
|
|||
Thanks Calorie - works a treat!!
@Watson - I saw that one, and will install it (looks great!) - but this is aimed at an unwanted "Guest", I got the impression that the miserable users hack was only for registered users who actually log on. Thanks! |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|