Answer the question
In order to leave comments, you need to log in
You do not have sufficient permissions to access this page. wordpress how to be?
can't win You don't have sufficient permissions to access this page. in the wordpress admin panel when using the https:// protocol
in htaccess, I wrote this:
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI } [L,R=301]
/define('FORCE_SSL_ADMIN', true);
if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')
$_SERVER['HTTPS']='on';
/** SSL in the admin panel */
define('FORCE_SSL_LOGIN', true);
/** SSL in login panel */
define('FORCE_SSL_ADMIN', true);
Answer the question
In order to leave comments, you need to log in
did you manage to solve the problem?
update:
if you decide to install all the same, then you did everything right, only there are two important points:
1. you only need to add this to the config:
define('FORCE_SSL_ADMIN', true);
if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')
$_SERVER['HTTPS']='on';
and always up to the line /* That's all, do not edit further. Good luck! */
2. add this to htaccess:
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L ,R=301]
but definitely before the wordpress block
I suffered myself for three days, but still I was able to plug in SSL, everything works.
Apparently, somewhere they made a mistake in the syntax. I registered this code in mysite.com/ru/wp-config.php (read below) and it all worked:
define( 'FORCE_SSL_ADMIN', true );
if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false)
$_SERVER['HTTPS']='on';
$_SERVER['HTTPS'] = 'on';
/* SSL в панели администратора */
define('FORCE_SSL_LOGIN', true);
/* SSL в панели входа */
define('FORCE_SSL_ADMIN', true);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question