Topic: Add another Base URL
Okay I am trying to connect two forums and I just need to know how I can add another base url so that the other forum can admin, edit etc.
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.2 troubleshooting → Add another Base URL
Okay I am trying to connect two forums and I just need to know how I can add another base url so that the other forum can admin, edit etc.
You'll have to modify confirm_referrer in functions.php
but what should I change???
PunBB doesn't allow multiple base urls by default. Thus, you need to modify the referrer check in include/functions.php
//
// Make sure that HTTP_REFERER matches $pun_config['o_base_url']/$script
//
function confirm_referrer($script)
{
global $pun_config, $lang_common;
if (!preg_match('#^'.preg_quote(str_replace('www.', '', $pun_config['o_base_url']).'/'.$script, '#').'#i', str_replace('www.', '', (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : ''))))
message($lang_common['Bad referrer']);
}
The simplest way would be to just code the extra URL into the function, although you could add another row to the conf table and use that instead
PunBB Forums → PunBB 1.2 troubleshooting → Add another Base URL
Powered by PunBB, supported by Informer Technologies, Inc.