• First off, I apologize if this has come up before, but I searched the forums and couldn’t find anything.

    I just set up WP with my 1and1 hosting domain. I am having problems with the AskApache Password Protect plugin. I can get as far as activating it and configuring it, but once I have set a password, I get blocked out with a 500 error from my entire Admin panel. I have tried going into my directory and deleting the .htaccess files, but it still gives me 500 errors. The only way to fix it is to completely delete all of my WP files and then upload the original ones to get it working again.

    I don’t know if it matters or not, but the only failures I got on the tests for configuring the plugin were “test for mod_security” and “test for PLAIN encryption”.

    I’m wondering if this doesn’t work because of 1and1 being my host? All I want to do is add some sense of security to my blog and this is becoming a headache. If anyone knows a simple solution..please help me!

    Thanks!!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Is your WP install in the root of your site? If so, this fix worked for me:

    Change your index.php file from

    <?php
    /* Short and sweet */
    define('WP_USE_THEMES', true);
    require('./wp-blog-header.php');
    ?>

    to

    <?php
    /* Short and sweet */
    $request_filename = $_SERVER['DOCUMENT_ROOT'].$_SERVER['REQUEST_URI'];
    $this_dir = dirname(__FILE__).’/';
    if($request_filename!=$this_dir && $request_filename!=__FILE__ && (is_file($request_filename) || is_dir($request_filename))) {
      // we are not supposed be here!
      die;
    }
    // load WordPress in /wp
    define(’WP_USE_THEMES’, true);
    require(’./wp/wp-blog-header.php’);
    ?>

    Disclaimer – I used this on a 2.0 install but I see no reason why it wouldn’t work here. Please let me know if it does.

    Oops – in the last line of code, it should be ./wp-blog-header.php – without the extra /wp/.

    Thread Starter tmette

    (@tmette)

    Sorry it took so long for me to reply, I have been quite busy today. No it’s not in the root directory of my site, it is in a folder called “blog”.

    In that case, I think there is another fix using .htaccess. Let me look around and I will post back soon.

    Here is an article that links to a couple of fixes – hopefully this will help you.

    WordPress admin password protection 404

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘AskApache Password Protect problem’ is closed to new replies.