• The password protected page that I have, suddenly gives a error 404 page.. By looking for a sollution I came upon this site
    So I created a .htaccess with in it `#prevent 404s when accessing password protected directories
    ErrorDocument 401 ./error.html
    ErrorDocument 403 ./error.html`
    And now all the pages give a 404. Even after I deleted the .htaccess .. ? What to do .. ?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter misscosmicdotcom

    (@misscosmicdotcom)

    Changing the permalinks AND back to month-day brought back the normal pages. The password protected page still gives the 404 error.

    Thread Starter misscosmicdotcom

    (@misscosmicdotcom)

    I found a sollution.
    I removed the snippet form the function.php and added a snippet that found and works :

    <?php
        function my_password_form() {
            global $post;
            $label = 'pwbox-'.( empty( $post->ID ) ? rand() : $post->ID );
            $o = '<form action="' . get_option('siteurl') . '/wp-login.php?action=postpass" method="post">
            ' . __( "To view this protected post, enter the password below:" ) . '
            <label for="' . $label . '">' . __( "Password:" ) . ' </label><input name="post_password" id="' . $label . '" type="password" size="20" maxlength="20" /><input type="submit" name="Submit" value="' . esc_attr__( "Submit" ) . '" />
            </form>
            ';
            return $o;
        }
        add_filter( 'the_password_form', 'my_password_form' );
        ?>

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Pageword protected page give 404 error (did I f*ck up with .htaccess .. ?’ is closed to new replies.