Title: HTTPS and HTACCESS Issues
Last modified: July 27, 2018

---

# HTTPS and HTACCESS Issues

 *  [twoagc](https://wordpress.org/support/users/twoagc/)
 * (@twoagc)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/https-and-htaccess-issues/)
 * All,
 * I converted my entire WordPress website to run over https. That said, though,
   I am having difficulty determining the proper htaccess configuration to force
   HTTPS for all URL calls. A few comments first:
 * Wordpress Version: 4.9.7
    PHP Version: 5.6.32 WordPress Address (URL): [https://www.wounited.org/wp](https://www.wounited.org/wp)
   Site Address (URL): [https://www.wounited.org/wp](https://www.wounited.org/wp)
 * htaccess file contents:
 *     ```
       # Use PHP56 Single php.ini as default
       AddHandler application/x-httpd-php56s .php
   
       RewriteEngine On
       RewriteCond %{HTTPS} off
       RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}/wp [R=301,L]
   
       # 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
       ```
   
 * The problem is that several important URL’s won’t resolve to https using the 
   htaccess above (without using the https:// prefix).
 * **These URL’s resolve to HTTPS**
    “wounited.org” “www.wounited.org”
 * **These URL’s DO NOT resolve to HTTPS**
    “wounited.org/wp/” “wounited.org/wp/
   about_us/” “wounited.org/wp/faq/” “wounited.org/wp/contact_us/” “wounited.org/
   wp/donate/” “www.wounited.org/wp/” “www.wounited.org/wp/about_us/” “www.wounited.
   org/wp/faq/” “www.wounited.org/wp/contact_us/” “www.wounited.org/wp/donate/”
 * (quotes added to keep the forum software from adding http prefix)
 * I can use the plugin “Really Simple SSL” to handle the problem URL’s, but I’d
   rather handle these directly with the htaccess file.
 * I suspect that the problem might be having the Site and WordPress URL’s the same.
 * Any suggestions?
 * Thank you,
    Mark
    -  This topic was modified 7 years, 8 months ago by [twoagc](https://wordpress.org/support/users/twoagc/).
    -  This topic was modified 7 years, 8 months ago by [twoagc](https://wordpress.org/support/users/twoagc/).
    -  This topic was modified 7 years, 8 months ago by [twoagc](https://wordpress.org/support/users/twoagc/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fhttps-and-htaccess-issues%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [HudsonValleyWebDesign](https://wordpress.org/support/users/jaycbrf/)
 * (@jaycbrf)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/https-and-htaccess-issues/#post-10534581)
 * Try using this in your htaccess
 *     ```
       # 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
       <IfModule mod_rewrite.c>
       RewriteEngine On
       RewriteCond %{HTTPS} off
       RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
       </IfModule>
       ```
   
 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/https-and-htaccess-issues/#post-10534590)
 * Or, search for [http://example.com](http://example.com) and replace with [https://example.com](https://example.com)
 * This plugin [Better Search And Replace](https://wordpress.org/plugins/better-search-replace/)
   can help do that.
 *  Thread Starter [twoagc](https://wordpress.org/support/users/twoagc/)
 * (@twoagc)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/https-and-htaccess-issues/#post-10534746)
 * [@jaycbrf](https://wordpress.org/support/users/jaycbrf/) & [@t-p](https://wordpress.org/support/users/t-p/),
 * Unfortunately, neither one of your suggestions worked … thanks for your efforts,
   though!
 * All,
 * I went ahead and modified the htaccess file to correct several issues. The new
   htaccess file contents:
 *     ```
       # Use PHP56 Single php.ini as default
       AddHandler application/x-httpd-php56s .php
   
       RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
       RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
       RewriteEngine On
       RewriteCond %{SERVER_PORT} 80
       RewriteCond %{HTTP_HOST} ^wounited\.org$ [OR]
       RewriteCond %{HTTP_HOST} ^www\.wounited\.org$ [OR]
       RewriteCond %{HTTP_HOST} ^wounited\.org\/wp$ [OR]
       RewriteCond %{HTTP_HOST} ^www\.wounited\.org\/wp$
       RewriteRule ^(.*)$ https://www.wounited.org/wp/$1  [R=301,L,NC]
       ```
   
 * Bottom line, I need the following URL’s to resolve to HTTPS (without using the
   https:// prefix):
 * “wounited.org” (Ok … Resolves to HTTPS)
    “www.wounited.org” (Ok … Resolves to
   HTTPS) “wounited.org/wp/” (Does NOT resolve to HTTPS) “www.wounited.org/wp/” (
   Does NOT resolve to HTTPS)
 * Thanks again,
    Mark

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

The topic ‘HTTPS and HTACCESS Issues’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [twoagc](https://wordpress.org/support/users/twoagc/)
 * Last activity: [7 years, 8 months ago](https://wordpress.org/support/topic/https-and-htaccess-issues/#post-10534746)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
