Title: htaccess
Last modified: August 20, 2016

---

# htaccess

 *  [horvath](https://wordpress.org/support/users/horvath/)
 * (@horvath)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/htaccess-35/)
 * Trying to add a https ReWrite Rule in the .htaccess file in public_html to force
   my site to load https.. all the the time. Not just only when a form loads for
   user input.
 * When I do, my admin login page will not work. ([http://www.donain-name.com/wp-login.php](http://www.donain-name.com/wp-login.php))
   When I enter the login credentials, the username and password just go away and
   nothing happened.
 * This happens when I add this to my .htaccess file
 * _[ Moderator Note: Please post code or markup snippets between backticks or use
   the code button. ]_
 *     ```
       RewriteEngine on
       RewriteCond %{HTTP_HOST} !^www.my-domain-name.com$
       RewriteRule ^(.*)$ https://www.my-domain-name/$1 [R=301]
       ```
   
 * For a total .htaccess file of
 *     ```
       # BEGIN WordPress
       <IfModule mod_rewrite.c>
       RewriteEngine On
       RewriteBase /
       RewriteRule ^index\.php$ - [L]
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteCond %{REQUEST_FILENAME} !-d
       RewriteRule . /index.php [L]
       </IfModule>
   
       # END WordPress
   
       RewriteEngine on
       RewriteCond %{HTTP_HOST} !^www.my-domain-name.com$
       RewriteRule ^(.*)$ https://www.my-domain-name/$1 [R=301]
       ```
   
 * When I remove the added
 *     ```
       RewriteEngine on
       RewriteCond %{HTTP_HOST} !^www.my-domain-name.com$
       RewriteRule ^(.*)$ https://www.my-domain-name/$1 [R=301]
       ```
   
 * Everything goes back to work fine.
 * If I remove the
 *     ```
       <IfModule mod_rewrite.c>
       RewriteEngine On
       RewriteBase /
       RewriteRule ^index\.php$ - [L]
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteCond %{REQUEST_FILENAME} !-d
       RewriteRule . /index.php [L]
       </IfModule>
       ```
   
 * My permlinks stop working.
 * Anytips please..
 * Thanks

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [jon](https://wordpress.org/support/users/adiant/)
 * (@adiant)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/htaccess-35/#post-2968338)
 * See “How do I make my whole website secure?” on this page:
    [http://wordpress.org/extend/plugins/wordpress-https/faq/](http://wordpress.org/extend/plugins/wordpress-https/faq/)
 * Sounds to me like you should be using the plugin shown there.
 *  Thread Starter [horvath](https://wordpress.org/support/users/horvath/)
 * (@horvath)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/htaccess-35/#post-2968345)
 * plug-in works great..
 * Thanks for the advice..!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘htaccess’ is closed to new replies.

## Tags

 * [htaccess](https://wordpress.org/support/topic-tag/htaccess/)
 * [log-in](https://wordpress.org/support/topic-tag/log-in/)

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 2 replies
 * 2 participants
 * Last reply from: [horvath](https://wordpress.org/support/users/horvath/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/htaccess-35/#post-2968345)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
