Support » Fixing WordPress » Re-direct to holding page

  • Hi all,

    I am working on a wordpress site and have created a simple php login page stored in it’s own folder /new/

    This uses the following code to direct people who have not loged in to the main wordpress root and its index.php file.

    The index.php file for wordpress looks like this:-

    if ( !isset( $_SESSION['username'] ) )
    	header( "Location: holding.html" );
     * Front to the WordPress application. This file doesn't do anything, but loads
     * wp-blog-header.php which does and tells WordPress to load the theme.
     * @package WordPress
     * Tells WordPress to load the WordPress theme and output it.
     * @var bool
    define('WP_USE_THEMES', true);
    /** Loads the WordPress Environment and Template */

    It used to work on old versions of WordPress but this one I just get directed to the holding page even if the login details are correct.

    I get the following error:-
    Warning: Cannot modify header information – headers already sent by (output started at /home/sitename/public_html/new/index.php:11) in /home/sitename/public_html/new/index.php on line 12

  • The topic ‘Re-direct to holding page’ is closed to new replies.