Web Hosting
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix Reply To: “Sorry you’re not allowed to access this page” after migrating to https

Discussion in 'Misc WordPress Requests' started by akshatjiwan, Oct 27, 2017.

  1. akshatjiwan

    Guest

    Reply To: “Sorry you’re not allowed to access this page” after migrating to https, by akshatjiwan

    Thank you Vince for the detailed reply! It was very helpful

    I can say with certainty that points #1 and #2 are not causing this issue. Because the user exists in the database and my nginx configuration files are pointing to the same location in both the cases. BTW you can check out the nginx files on github if it helps(https://github.com/ellobd/wp-eb/tree/master/nginx)

    I do have a couple of follow-ups on point #4

    >The wp-config.php code appears to be fine at first glance, but it isn’t strictly necessary to make HTTPS work; it’s only there to force HTTP attempts to be loaded as HTTPS. Have you tried removing this code and testing HTTPS again specifically? (I assume you have to remove the code when you test HTTP and login successfully.)

    Yes I have to change the configuration files during http and https tests. The real problem is that I’m unable to identify the true cause of this issue. These are the steps that I take when moving from one scheme to another

    – I have to change configuration files (wordpress)
    – I have to update the urls in the database

    So these are the questions I have

    1. Is there anything that I might be missing when moving from http to https? Perhaps setting a parameter somewhere that I could have forgotten?
    2. You say that config code is not necessary but that has not been my observation. I can not make https code work at all if the following lines are not present

    if (strpos($_SERVER[‘HTTP_X_FORWARDED_PROTO’], ‘https’) !== false)
    $_SERVER[‘HTTPS’]=’on’;

    Could it mean that there might be something wrong somewhere else?

    Thanks,
    Akshat

    Reply To: “Sorry you’re not allowed to access this page” after migrating to https
     
    #1

Share This Page

Web Hosting