I built a WordPress STAGING site on projectjustcause.com domain. I have installed and tested paid SSL cert and it worked fine. When I added directives to APACHE 2.4 .htaccess file to forward all http requests to https, the whole site works except the wells page:
https://projectjustcause.com/wells
In Chrome, I get the "Deceptive site ahead" red page warning.
However, the page loads fine in Firefox.
Further, if I click to approve the site as safe, the URL bar displays "Dangerous" where the padlock should be.
HTACCESS
Here is what the .htaccess file looked like before I added my HTTPS forwarding directives:
# This file was updated by Duplicator Pro on 2023-07-11 12:30:13.
# See the original_files_ folder for the original source_site_htaccess file.
# BEGIN WordPress
# The directives (lines) between "BEGIN WordPress" and "END WordPress" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
And these are the lines I added at the end:
# BEGIN ElijahStreamsCustomCode
<IfModule ssl_module>
RewriteEngine On
RewriteCond %{HTTPS} !=on
Header always set Content-Security-Policy "upgrade-insecure-requests;"
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
</IfModule>
# END ElijahStreamsCustomCode
HTACCESS MODIFICATIONS
- Removing the
<IfModule>
tags didn't fix the issue - Removing the
# Comments
didn't fix the issue
I have tried clearing HSTS and browser cache, to no avail.
MY QUESTION
What is causing this and how can I solve it?
PLUGIN TESTS
- The issue did not go away with all plugins disabled.
- I completely deleted WordFence plugin including all tables and reinstalled multiple times. WordFence adds code to the .htaccess file, but the site works fine with the code except for the wells page.
SYSTEM SETUP:
- WAMP Manager: Local by Flywheel: 7.0.2+6395
- Windows 10 64-bit
- PHP: 8.1.9
- Web Server: Apache 2.4.43
- Database: MySQL 8.0.16
- SSL cert automatically generated and activated by Local