Title: basic auth prompts in loop
Last modified: April 27, 2019

---

# basic auth prompts in loop

 *  [nimo24](https://wordpress.org/support/users/nimo24/)
 * (@nimo24)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/basic-auth-prompts-in-loop/)
 * I have set up common basic auth (only for development purpose) on wordpress installation
   by using this “.htaccess”:
 *     ```
       # BEGIN WordPress
       <IfModule mod_rewrite.c>
       RewriteEngine On
       RewriteBase /
       RewriteRule ^index\.php$ - [L]
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteCond %{REQUEST_FILENAME} !-d
       RewriteRule . /index.php [L]
       </IfModule>
   
       # END WordPress
   
       # BEGIN AuthType 
       AuthType Basic
       AuthName "Protected Area"
       AuthUserFile /homepages/xxxxxx/wordpress/.htpasswd
       Require valid-user
       # END AuthType
       ```
   
 * with a valid “.htpasswd”.
 * However, when visiting the wordpress site, the browser prompts the basic auth
   for every link and every file. I am using https and all works however, the browser
   should prompt for basic auth only once and not every time when user navigates
   through the site. What is wrong?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Joy](https://wordpress.org/support/users/joyously/)
 * (@joyously)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/basic-auth-prompts-in-loop/#post-11473484)
 * This is not a WordPress question.
    According to [https://httpd.apache.org/docs/current/howto/auth.html](https://httpd.apache.org/docs/current/howto/auth.html)
   it looks correct, but to get answers for non-WordPress things, it’s best that
   you ask somewhere that the topic is known.
 *  Thread Starter [nimo24](https://wordpress.org/support/users/nimo24/)
 * (@nimo24)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/basic-auth-prompts-in-loop/#post-11473850)
 * Using a “static” webpage with no wordpress/php, the same basic auth setup with.
   htaccess works without prompting the user again and again on each page link..
   so it has to do with wordpress.
 * In [https://de.wordpress.org/plugins/http-digest-auth/](https://de.wordpress.org/plugins/http-digest-auth/),
   it is described that
 * > If you are using FastCGI PHP this plugin may keep prompting for the credentials
   > even if you enter the right pair, in this case use the following in your .htaccess
   > file
 *  (I dont use this plugin.)
 *     ```
       <IfModule mod_setenvif.c>
       SetEnvIfNoCase ^Authorization$ "(.+)" PHP_AUTH_DIGEST=$1
       </IfModule>
       ```
   
 * However, I dont use digest auth but basic auth, the above leads to HTTP-Error“
   500 Internal Server Error”.
 * I try this [https://www.coderrr.com/using-http-auth-basic-wordpress/](https://www.coderrr.com/using-http-auth-basic-wordpress/)
   instead of using basic auth in .htaccess.
    ** Or maybe someone knows a simpler
   solution by using proper .htaccess setup?
    -  This reply was modified 7 years, 1 month ago by [nimo24](https://wordpress.org/support/users/nimo24/).

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘basic auth prompts in loop’ is closed to new replies.

## Tags

 * [HTTPS](https://wordpress.org/support/topic-tag/https/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [nimo24](https://wordpress.org/support/users/nimo24/)
 * Last activity: [7 years, 1 month ago](https://wordpress.org/support/topic/basic-auth-prompts-in-loop/#post-11473850)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
