I
I
ivgenij72016-02-01 00:53:08
Digital certificates
ivgenij7, 2016-02-01 00:53:08

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]

in config is
/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);

in the table I changed http:// to https://
and turned off plugins.
wordpress 4.4.1
what are the solutions?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ilyas Yakubov, 2016-02-25
@Ilyasyakubov

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.

A
Andrews32, 2016-07-08
@Andrews32

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);

But I still had another problem unresolved:
I wanted to transfer the Russian version of the site from http ://ru.mysite.com to http s ://mysite.com/ru/
(both sites have the same set of pages and their URLs)
But when accessing the Russian version of the page (mysite.com/ru/page1/ provided that there is an English page with the same CNC - mysite.com/page1/
with a properly working Wordpress in the /ru/ folder, redirects me to mysite.com/page1/ (without /ru/)
i.e. for some reason, CNC requests are processed by WP, which lies in the root of the site...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question