Thanks very much kh99! I just tried putting the no-cache header in the function but it's still caching IP block messages for everyone. I highlighted the line I added below:
Code:
function verify_ip_ban()
{
// make sure we can contact the admin
if (THIS_SCRIPT == 'sendmessage' AND (empty($_REQUEST['do']) OR $_REQUEST['do'] == 'contactus' OR $_REQUEST['do'] == 'docontactus'))
{
return;
}
global $vbulletin;
$user_ipaddress = IPADDRESS . '.';
$user_alt_ipaddress = ALT_IP . '.';
if ($vbulletin->options['enablebanning'] == 1 AND $vbulletin->options['banip'] = trim($vbulletin->options['banip']))
{
$addresses = preg_split('#\s+#', $vbulletin->options['banip'], -1, PREG_SPLIT_NO_EMPTY);
foreach ($addresses AS $banned_ip)
{
if (strpos($banned_ip, '*') === false AND $banned_ip{strlen($banned_ip) - 1} != '.')
{
$banned_ip .= '.';
}
$banned_ip_regex = str_replace('\*', '(.*)', preg_quote($banned_ip, '#'));
// Check both IP addresses, it doesnt really matter if they are the same.
if (preg_match('#^' . $banned_ip_regex . '#U', $user_ipaddress) OR preg_match('#^' . $banned_ip_regex . '#U', $user_alt_ipaddress))
{
header('X-LiteSpeed-Cache-Control: no-cache');
eval(standard_error(fetch_error('banip', $vbulletin->options['contactuslink'])));
}
}
}
}
Any idea why this ban page would still be getting cached? I know this header works in other areas (such as for all logged-in users). But in this specific area, it doesn't seem to work.