Force SSL on iThemes Security's "Hide Backend"

I have tried to force SSL on the 'Hide Backend' slug I created through iThemes Security plugin using the following code (htaccess)

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} folder
RewriteRule ^(.*)$ https://yourdomain.com/folder/$1 [R=301,L]

Does anyone know another way to do this?

Thanks,
Chris

  • Rupok

    Hi Chris,

    I hope you don't mind me chimming in here. I just want to add some points with what Kasia provided above.

    # You should add that line at the bottom of your .htaccess file
    # If you have any security plugins which has possibility to modify your .htaccess file, then you should add your custom .htaccess rules through that plugin. For example, some security plugins add rule in .htaccess file and some give you alert when they find any modification in default WordPress files. Most of the time, they provide you option to add custom .htaccess rules through their options.

    For example, if you use iThemes Security plugin, then this might give you some valuable insight:

    iThemes Security uses comments in the htaccess as delimiters and only writes content inside of those (essentially remove the content from open to close delimiter and then writing new, when the situation calls for it).

    # BEGIN iThemes Security - Do not modify or remove this line
    ...
    # END iThemes Security - Do not modify or remove this line

    Make sure that both those lines are there just in case, and check for duplicated (I had someone the other day that had copy/pasted some things in their file and ended up with several of the "# BEGIN" tags and only one end tag, and it was messing things up — although not rewriting the WordPress rules)

    I believe, these will help. Please let us know if you have any confusion. We will be glad to help.

    Have a nice day. Cheers!
    Rupok

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.