• I fixed this recently and thought I’d share the check with everyone.

    Our WordPress site kept returning a 404 page when trying to access password protected pages, as well as the login page on occasion.

    It returned the ?action=postpass in the URL.

    Lots of hunting and debugging and I noticed that the site…wasn’t secure (No Secure SSL icon).
    So I forced the site to SSL via my .htaccess file and VOILA! The password protected pages work fine now!

    I just added

    RewriteEngine On
    RewriteCond %{HTTPS} !=on
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
    Header always set Content-Security-Policy "upgrade-insecure-requests;"

    to the top of my .htaccess file

    Hope this helps someone!!

    • This topic was modified 5 years, 2 months ago by lightyearsdev.

The topic ‘Password protect 404 fix’ is closed to new replies.