When logged-in wp-admin
is redirecting to wp-login.php
via 302.
There are 2 behaviours:
1) Username/password correct. 302 redirect to /wp-admin/ followed by a 302 redirect to /wp-login.php
2) Username/Password entered is wrong, no redirect. 200 response with "ERROR: Incorrect username or password." displayed.
Wordpress configuration (I've replaced the real domain with "testdomain.com"):
$_SERVER['HTTPS']='on';
define( 'FORCE_SSL_LOGIN', false );
define( 'FORCE_SSL_ADMIN', false );
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');
//$currenthost = "https://".$_SERVER['HTTP_HOST'];
$currenthost = "https://exampledomain.com";
$currentpath = preg_replace('@/+$@','',dirname($_SERVER['SCRIPT_NAME']));
$currentpath = preg_replace('/\/wp.+/','',$currentpath);
define('WP_HOME',$currenthost.$currentpath);
define('WP_SITEURL',$currenthost.$currentpath);
define('WP_CONTENT_URL', $currenthost.$currentpath.'/wp-content');
define('WP_PLUGIN_URL', $currenthost.$currentpath.'/wp-content/plugins');
define('DOMAIN_CURRENT_SITE', $currenthost.$currentpath );
define('ADMIN_COOKIE_PATH', './');
define('WP_BASE', $currenthost.$currentpath);
define('FS_METHOD', 'direct');
define('FS_CHMOD_DIR', (0705 & ~ umask()));
define('FS_CHMOD_FILE', (0604 & ~ umask()));
Any ideas?
If you are sure that your login credentials are correct, you can make use of the "wp_authenticate" hook as follows: