<?php
/**
 * $Horde: forwards/index.php,v 1.11 2003/08/24 22:48:10 jan Exp $
 *
 * Copyright 2001-2003 Eric Rostetter <eric.rostetter@physics.utexas.edu>
 *
 * See the enclosed file LICENSE for license information (BSD). If you
 * did not receive this file, see http://www.horde.org/licenses/bsdl.php.
 */

define('FORWARDS_BASE', dirname(__FILE__));
$forwards_configured = (@is_readable(FORWARDS_BASE . '/config/conf.php'));

if ($forwards_configured) {
    include_once FORWARDS_BASE . '/lib/base.php';
    $uri = 'main.php';
    if (!empty($_SERVER['QUERY_STRING'])) {
       $uri .= '?' . $_SERVER['QUERY_STRING'];
    }
    header('Location: ' . Horde::applicationUrl($uri, true));
    exit;
} else {
    /* Forwards isn't configured */
    require FORWARDS_BASE . '/../lib/Test.php';
    Horde_Test::configFilesMissing('Forwards', FORWARDS_BASE, array('conf.php'));
}
