Title: AskApache Password Protect problem
Last modified: August 19, 2016

---

# AskApache Password Protect problem

 *  [tmette](https://wordpress.org/support/users/tmette/)
 * (@tmette)
 * [18 years ago](https://wordpress.org/support/topic/askapache-password-protect-problem/)
 * 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)

 *  [RoseCitySister](https://wordpress.org/support/users/rosecitysister/)
 * (@rosecitysister)
 * [17 years, 12 months ago](https://wordpress.org/support/topic/askapache-password-protect-problem/#post-788572)
 * 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.
 *  [RoseCitySister](https://wordpress.org/support/users/rosecitysister/)
 * (@rosecitysister)
 * [17 years, 12 months ago](https://wordpress.org/support/topic/askapache-password-protect-problem/#post-788636)
 * Oops – in the last line of code, it should be ./wp-blog-header.php – without 
   the extra /wp/.
 *  Thread Starter [tmette](https://wordpress.org/support/users/tmette/)
 * (@tmette)
 * [17 years, 12 months ago](https://wordpress.org/support/topic/askapache-password-protect-problem/#post-788681)
 * 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”.
 *  [RoseCitySister](https://wordpress.org/support/users/rosecitysister/)
 * (@rosecitysister)
 * [17 years, 12 months ago](https://wordpress.org/support/topic/askapache-password-protect-problem/#post-788698)
 * In that case, I think there is another fix using .htaccess. Let me look around
   and I will post back soon.
 *  [RoseCitySister](https://wordpress.org/support/users/rosecitysister/)
 * (@rosecitysister)
 * [17 years, 12 months ago](https://wordpress.org/support/topic/askapache-password-protect-problem/#post-788711)
 * Here is an article that links to a couple of fixes – hopefully this will help
   you.
 * [WordPress admin password protection 404](http://developedtraffic.com/2007/05/27/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.

## Tags

 * [500 error](https://wordpress.org/support/topic-tag/500-error/)
 * [htaccess](https://wordpress.org/support/topic-tag/htaccess/)

 * 5 replies
 * 2 participants
 * Last reply from: [RoseCitySister](https://wordpress.org/support/users/rosecitysister/)
 * Last activity: [17 years, 12 months ago](https://wordpress.org/support/topic/askapache-password-protect-problem/#post-788711)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
