<?php
    define('SSOCONF', '/etc/httpd/conf/sso.conf');

    $url = '/error/HTTP_FORBIDDEN.html.var';
    if (file_exists(SSOCONF)) {
        $config = file_get_contents(SSOCONF);
        if (preg_match("/\n[^#]*TKTAuthUnauthURL +(.+)/", $config, $matches)) {
            $url = $matches[1];
        }
    }

    header('Location: '.$url);
    exit(0);
?>
