The .htaccess is the fastest redirect, so why not enable it by default?
When you enable the setting “301 .htaccess redirect” under Security -> Settings -> SSL, Really Simple Security includes the most suitable HTTPS redirect and then opens a test page to verify that this option won’t result in redirect loops.
Even so, the detected redirect could cause a loop: there are a lot of server configurations, and some respond unexpectedly to the proposed rules.
If this happens, you get locked out of the back-end because of the redirect loop. For this reason, this setting is optional. We do recommend using it, but you need to know how to remove it just in case.
This only happens on about 1% of the sites and is easily fixed, but make sure you have FTP access.
If you encounter an issue when this setting is enabled, just remove the rewrite rule from your .htaccess file:
- Open your FTP client (for example: FileZilla or CyberDuck)
- In the root of your website, look for the .htaccess file. If you cannot find it, make sure that FileZilla shows hidden files.
- Open the .htaccess file in a text editor.
- Look for the ‘lines/comments’ below and remove these sections entirely. (So, remove all of the lines between the comments, and the comments themselves as well.)
# BEGIN Really Simple Security Redirect # END Really Simple Security Redirect
Note: If you’re using the Pro plugin, make sure to also remove the section marked as # BEGIN and #END Really Simple Auto Prepend File. - Prevent Really Simple Security from editing the .htaccess any further:
- Look for wp-config.php in the root of your site.
- Open the wp-config.php file, and add the following line at the top, but after the opening PHP tag:
<?php
define( 'RSSSL_SAFE_MODE', TRUE );
- Change the redirect setting in the plugin to ‘301 PHP redirect’
- Remove the safe mode constant from the wp-config.php file once more