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 vincek1, Oct 27, 2017.

  1. vincek1

    Guest

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

    Hello Akshat,

    While you’re correct that the proper way to enable full HTTPS on a site is to make the change to the configuration files and update the URLs in the database, for the purpose of isolating the root cause of this issue, it should not be necessary to change every URL in the database and the configuration files each time you switch from HTTP to HTTPS. HTTPS should be able to work alongside HTTP (though the rewrites may be strong enough to redirect your HTTPS attempts back to HTTP). This is why I said the config code should not be necessary. However! I was incorrect; there are times when HTTP_X_FORWARDED_PROTO code is necessary to prevent a redirect loop.

    So, with all of the above said, the short answer to both your questions is Yes. The long answer involves having you do a bit of troubleshooting yourself. Depending on your web host, your host’s support team may also be able to help.

    1. When you say that you cannot make https code work at all if the “IF” statement is not present, what is the behavior when you try to load HTTPS without those lines present? Does that behavior change when you try to load interior links versus the home page, or when you try to log into wp-admin?

    2. What about point #3 in my earlier reply – have you tried loading the browser’s developer tools and watching the Network tab to view all HTTP/HTTPS requests and see any errors in the console? If so, what have you seen?

    I did look at your Nginx configuration files but nothing immediately struck me as incorrect or strange. However, my experience with Nginx conf files is limited, so take my review with a grain of salt.

    Thanks,
    – Vince

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

Share This Page

Web Hosting