htaccess redirect stopped working
-
I haven’t changed settings on the plugin for months, simply updated it on new versions.
Tools > Site Health reported today that “301 .htaccess redirect is not enabled”. When I checked in SSL Settings, both WordPress and .htaccess redirects were ON. No idea how. It used to be only htaccess.
This is the code in my .htaccess file, which used to work:
# BEGIN rlrssslReallySimpleSSL
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTPS} !=on [NC]
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/ [NC]
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>
# END rlrssslReallySimpleSSLI reloaded the htaccess file with the above SSL code. Then turned off WordPress, set ‘Enable 301 .htaccess redirect’ and ‘Stop editing the .htaccess file’ to ON.
Then I save settings, and I now get this message at the top of the page:
You do not have a 301 redirect to HTTPS active in the settings. For SEO purposes it is advised to use 301 redirects. You can enable a 301 redirect in the settings. View settings page
And under Enable 301… this:
The .htaccess redirect rules that were selected by this plugin failed in the test. The following redirect rules were tested:
# BEGIN rlrssslReallySimpleSSL rsssl_version[3.2.6]
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
</IfModule>
# END rlrssslReallySimpleSSL
If the setting ‘do not edit htaccess’ is enabled, you can’t change this setting.I also now get this message in Configuration, along with a red “1” by Settings > SSL , which has never appeared until just now:
WordPress 301 redirect enabled. We recommend to enable the 301 .htaccess redirect option on your specific setup. Enable or dismiss
Any idea what’s gone wrong and how to fix? I’ve turned WordPress redirect back on (and htaccess off) so everything continues to work properly.
The page I need help with: [log in to see the link]
The topic ‘htaccess redirect stopped working’ is closed to new replies.