Title: code in htaccess
Last modified: January 3, 2020

---

# code in htaccess

 *  Resolved [Deon](https://wordpress.org/support/users/deon-b/)
 * (@deon-b)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/code-in-htaccess/)
 * Hi,
    this plugin works great and all. Nothing against it.
 * But I would really like to do without it.
    I followed the instructions here: 
   [https://www.wpbeginner.com/wp-tutorials/how-to-add-ssl-and-https-in-wordpress/](https://www.wpbeginner.com/wp-tutorials/how-to-add-ssl-and-https-in-wordpress/)
 * and copied this code in htaccess:
 *     ```
       RewriteEngine On
       RewriteCond %{HTTPS} off [OR]
       RewriteCond %{HTTP_HOST} ^www. [NC]
       RewriteCond %{HTTP_HOST} ^(?:www.)?(.+)$ [NC]
       RewriteRule ^ https://%1%{REQUEST_URI} [L,NE,R=301]
       ```
   
 * Slightly different code from the one in the blog (someone in the google webmaster
   forum suggested me this second one was better).
 * All looks fine apparently,
    only small problem is this: when I go to:
 * [http://website.com/some-url-here/](http://website.com/some-url-here/)
    I don’t
   get redirected to: [https://website.com/some-url-here/](https://website.com/some-url-here/)
   but I get redirected to: [https://website.com](https://website.com)
 * So now I remove the htaccess and installed your plugin and this has been fixed.
 * Can you please tell me which htaccess is your plugin injecting/using so that 
   your redirects are correct and mine are wrong?
 * Thank you!

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [Rogier Lankhorst](https://wordpress.org/support/users/rogierlankhorst/)
 * (@rogierlankhorst)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/code-in-htaccess/#post-12291666)
 * Hi [@deon-b](https://wordpress.org/support/users/deon-b/),
 * If you have enabled the .htaccess redirect, then use the option “deactivate, 
   but keep https”, the .htaccess lines will stay in place. You can find this option
   in settings/ssl/settings.
 * You can then check the .htaccess file for the used redirect rules.

Viewing 1 replies (of 1 total)

The topic ‘code in htaccess’ is closed to new replies.

 * ![](https://ps.w.org/really-simple-ssl/assets/icon-256x256.png?rev=2839720)
 * [Really Simple Security - Simple and Performant Security (formerly Really Simple SSL)](https://wordpress.org/plugins/really-simple-ssl/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/really-simple-ssl/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/really-simple-ssl/)
 * [Active Topics](https://wordpress.org/support/plugin/really-simple-ssl/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/really-simple-ssl/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/really-simple-ssl/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Rogier Lankhorst](https://wordpress.org/support/users/rogierlankhorst/)
 * Last activity: [6 years, 5 months ago](https://wordpress.org/support/topic/code-in-htaccess/#post-12291666)
 * Status: resolved