Title: Use of RewriteCond %{HTTPS} !=on
Last modified: August 8, 2018

---

# Use of RewriteCond %{HTTPS} !=on

 *  Resolved [kkinfy](https://wordpress.org/support/users/kkinfy/)
 * (@kkinfy)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/use-of-rewritecond-https-on/)
 * Hi,
 * In the htaccess code generated by WPFC, I could see the below line.
 * **RewriteCond %{HTTPS} !=on**
 * I understand this rule matches only those URLs that are NOT https (not secure).
   But my site is a https website. Should I remove the above line from htacccess?

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

 *  Thread Starter [kkinfy](https://wordpress.org/support/users/kkinfy/)
 * (@kkinfy)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/use-of-rewritecond-https-on/#post-10572371)
 * I have analyzed further on my doubt. Please check if my understanding is correct.
 * 1. WP Fastest Cache uses MOD REWRITE to serve only HTTP pages from cache.
    2.
   For HTTPS pages, the processing is at PHP level and not at MOD REWRITE Level.
 * For curiosity sake I commented out the **RewriteCond %{HTTPS} !=on** on my htaccess
   and checked the **Time To First Byte or TTFB**. TTFB improved by almost 100%.(
   From about 1200 ms to 700 ms) .
 * Hence on my websites using WP Fastest Cache I am planning to comment out RewriteCond%{
   HTTPS} !=on.
 * Still I don’t understand the need for HTTPS pages to be bypassed at MOD REWRITE
   and be handled at PHP level. In future, it could be better if you remove RewriteCond%{
   HTTPS} !=on from htaccess provided there are no adverse effects.
 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/use-of-rewritecond-https-on/#post-10573135)
 * Please take a look at the following tutorial for the solution.
 * [http://www.wpfastestcache.com/tutorial/plugin-does-not-work-after-https-redirection/](http://www.wpfastestcache.com/tutorial/plugin-does-not-work-after-https-redirection/)
 *  Thread Starter [kkinfy](https://wordpress.org/support/users/kkinfy/)
 * (@kkinfy)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/use-of-rewritecond-https-on/#post-10573664)
 * Hi, my question is not about the functioning of the cache after https redirection.
   The cache is working fine. What I fail to understand is how cache works properly
   for https pages even with the line **RewriteCond %{HTTPS} !=on** on mod rewrite.
 * My guess (please see my second reply in this thread) is **PHP** handles HTTPS
   pages while** Mod_Rewrite **handles non-HTTP pages.
 * Why not force Mod_Rewrite to handle both by removing the RewriteCond %{HTTPS}!
   =on line. You can take this as **a suggestion for the next update**. Because 
   doing so has increased the TTFB (First Byte Time) for my site significantly.
    -  This reply was modified 7 years, 10 months ago by [kkinfy](https://wordpress.org/support/users/kkinfy/).
 *  Thread Starter [kkinfy](https://wordpress.org/support/users/kkinfy/)
 * (@kkinfy)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/use-of-rewritecond-https-on/#post-10574130)
 * Sorry there was a typo in my previous reply. TTFB decreased (improved) as a result
   of commenting out RewriteCond %{HTTPS} !=on line.
 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/use-of-rewritecond-https-on/#post-10574617)
 * You should not interested in the htaccess rules of wp fastest cache.
    Can you
   tell me the url please? let me check.
 *  Thread Starter [kkinfy](https://wordpress.org/support/users/kkinfy/)
 * (@kkinfy)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/use-of-rewritecond-https-on/#post-10576002)
 * Hi,
 * I have shared my URL in email to [fastestcache@gmail.com](https://wordpress.org/support/topic/use-of-rewritecond-https-on/fastestcache@gmail.com?output_format=md).
   Kindly have a look and let me know if the functioning is fine. Please note I 
   have commented out the line RewriteCond %{HTTPS} !=on
    -  This reply was modified 7 years, 10 months ago by [kkinfy](https://wordpress.org/support/users/kkinfy/).
 *  Thread Starter [kkinfy](https://wordpress.org/support/users/kkinfy/)
 * (@kkinfy)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/use-of-rewritecond-https-on/#post-10577297)
 * Thanks, I got the response email. Your support is great as always. Keep up the
   good work.
 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/use-of-rewritecond-https-on/#post-10580008)
 * you are welcome 🙂

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

The topic ‘Use of RewriteCond %{HTTPS} !=on’ is closed to new replies.

 * ![](https://ps.w.org/wp-fastest-cache/assets/icon-256x256.png?rev=2064586)
 * [WP Fastest Cache - WordPress Cache Plugin](https://wordpress.org/plugins/wp-fastest-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-fastest-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-fastest-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-fastest-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-fastest-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-fastest-cache/reviews/)

## Tags

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

 * 8 replies
 * 2 participants
 * Last reply from: [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * Last activity: [7 years, 10 months ago](https://wordpress.org/support/topic/use-of-rewritecond-https-on/#post-10580008)
 * Status: resolved