Title: WordPress https site
Last modified: August 21, 2016

---

# WordPress https site

 *  Resolved [Cartographer](https://wordpress.org/support/users/cartographer/)
 * (@cartographer)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/wordpress-https-site/)
 * Hi,
 * First of all, congratulations for your work!
 * I would like to point out a problem.
 * I use https as my default wordpress address (Settings – General). Before using
   your plugin everyone who visited my website using [http://www.example.com](http://www.example.com)
   was redirected to [https://www.example.com](https://www.example.com).
 * After using the WP Fastest Cache the redirection stopped. Maybe it has something
   to do with changes in .htaccess.
 * I would really like your help as I want to use your plugin which is great!
 * Thanks in advance
 * [https://wordpress.org/plugins/wp-fastest-cache/](https://wordpress.org/plugins/wp-fastest-cache/)

Viewing 15 replies - 16 through 30 (of 31 total)

[←](https://wordpress.org/support/topic/wordpress-https-site/?output_format=md) 
[1](https://wordpress.org/support/topic/wordpress-https-site/?output_format=md) 
2 [3](https://wordpress.org/support/topic/wordpress-https-site/page/3/?output_format=md)
[→](https://wordpress.org/support/topic/wordpress-https-site/page/3/?output_format=md)

 *  [selimforever](https://wordpress.org/support/users/selimforever/)
 * (@selimforever)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/wordpress-https-site/page/2/#post-4575370)
 * Hi cartographer .
    Maybe directions at the belove solve your problem.
 * 1) write this to your .htaccess file
 *     ```
       # BEGIN GzipWpFastestCache
       <IfModule mod_deflate.c>
       AddOutputFilterByType DEFLATE text/plain
       AddOutputFilterByType DEFLATE text/html
       AddOutputFilterByType DEFLATE text/xml
       AddOutputFilterByType DEFLATE text/css
       AddOutputFilterByType DEFLATE application/xml
       AddOutputFilterByType DEFLATE application/xhtml+xml
       AddOutputFilterByType DEFLATE application/rss+xml
       AddOutputFilterByType DEFLATE application/javascript
       AddOutputFilterByType DEFLATE application/x-javascript
       </IfModule>
       # END GzipWpFastestCache
   
       # BEGIN WpFastestCache
       <IfModule mod_rewrite.c>
   
       RewriteEngine On
       RewriteCond %{HTTPS} off
       RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
   
       RewriteBase /
       RewriteCond %{REQUEST_METHOD} !POST
       RewriteCond %{QUERY_STRING} !.*=.*
       RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
       RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
       RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
       RewriteCond %{HTTPS} !on
       RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/all/$1/index.html -f
       RewriteRule ^(.*) "/wp-content/cache/all/$1/index.html" [L]
   
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteCond %{REQUEST_FILENAME} !-d
       RewriteRule . /index.php [L]
       </IfModule>
       # END WpFastestCache
       ```
   
 * 2) change checkInternal function with belowe code in css-utilites.php.
 *     ```
       public function checkInternal($link){
       			$contentUrl = str_replace(array("http://www.", "http://", "https://", "https://www."), "", content_url());
       			$httpHost = str_replace("www.", "", $_SERVER["HTTP_HOST"]);
       			if(preg_match("/href=[\"\'](.*?)[\"\']/", $link, $href)){
       				if(strpos($href[1], $httpHost)){
       					if(strpos($href[1], $contentUrl."/themes") || strpos($href[1], $contentUrl."/plugins"))
       					{
       						return $href[1];
       					}
       				}
       			}
       			return false;
       		}
       ```
   
 * _[Moderator Note: Please post code & markup between backticks or use the code
   button. Your posted code may now have been permanently damaged by the forum’s
   parser.]_
 * After this point i want to continue with turkish. make it easy.
 * Emre programın çok güzel gerçekten. 7.8.8 sürümünü kullanıyorum ve css konusunda
   sıkıntıları vardı biraz. Css urleleri ve pathları ile ilgili sıkıntıları yeniden
   yazarak çözdüm. Ama asıl sorun css-utilities.php deki sıkıştırma işlevlerinin
   kullandığım versiyonda işe yaramaması. Bu son sürümde çözüldümü.Ayrıca bu sıkıştırlan
   css dosyalarını eğer <!– [if IE]–> gibi etiketler içinde değilse tek bir dosya
   halinde tutmak çok daha yararlı olacaktır.htaccess dosyasında yapılacak değişiklikler
   kullanıcların sistemine bağlı olduğu için, rewritebase gibi, yönetim panelinde
   bu tarz şeyleri parametrik olarak istemek yararlı olacaktır.
    Eline sağlık kolay
   gelsin.
 *  Thread Starter [Cartographer](https://wordpress.org/support/users/cartographer/)
 * (@cartographer)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/wordpress-https-site/page/2/#post-4575371)
 * Hi Emre,
 * Where exactly should I copy these lines?
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/wordpress-https-site/page/2/#post-4575372)
 * I’m sorry but these are English language community forums, so please use English
   or provide an English translation. Alternatively, use a [WP support forum in your language](http://codex.wordpress.org/WordPress_in_Your_Language).
 *  Thread Starter [Cartographer](https://wordpress.org/support/users/cartographer/)
 * (@cartographer)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/wordpress-https-site/page/2/#post-4575373)
 * Selim I just saw your message. I will take a look!
 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/wordpress-https-site/page/2/#post-4575374)
 * çok tşk ederim 🙂 css sıkıştırma olayında ben yanlış bir şey yapmışım
 * $cssContent = $this->_process($css);
    $cssContent = $this->fixPathsInCssContent(
   $css);
 * böyle yapmıştım. $cssContent yerine $css’yi gönderiyordum fonksiyona ama düzelttim.
   v 0.7.8.9’da sorunsuz çalışıyor.
 * > eğer <!– [if IE]–> gibi etiketler içinde değilse tek bir dosya halinde tutmak
   > çok daha yararlı olacaktır
 * ben de bunu kolayca yapabilmek için “minify css” fonksiyonunu class haline getirdim.
   planlarım arasında yer alıyor. hatta ilk ekleceğim yenilik “combine css” olacak.
 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/wordpress-https-site/page/2/#post-4575375)
 * Hi Cartographer,
 * add this line – RewriteRule ^(.*)$ [https://www.%](https://www.%){HTTP_HOST}/
   $1 [R=301,L]
 * after – RewriteBase /
 * got it?
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/wordpress-https-site/page/2/#post-4575376)
 * I’m sorry but these are English language community forums, so please use English
   or provide an English translation. Alternatively, use a [WP support forum in your language](http://codex.wordpress.org/WordPress_in_Your_Language).
 *  Thread Starter [Cartographer](https://wordpress.org/support/users/cartographer/)
 * (@cartographer)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/wordpress-https-site/page/2/#post-4575377)
 * Unfortunatelly, no luck yet.
 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/wordpress-https-site/page/2/#post-4575378)
 * what does it mean? Cannot you change or didn’t it affect?
 *  [selimforever](https://wordpress.org/support/users/selimforever/)
 * (@selimforever)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/wordpress-https-site/page/2/#post-4575380)
 * Sorry esmi.
    But i know a little english and WP support forum in our language
   is useless in this case. i ‘ll try to be carefull about your warnings. Thanks.
 * Hi Cartographer
 * try to change this line
    `RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}`
   with `RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L]`
 * and have a look access and error log in your server.
 *  [selimforever](https://wordpress.org/support/users/selimforever/)
 * (@selimforever)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/wordpress-https-site/page/2/#post-4575381)
 * Emre i look forward to new versiyon for css combine.
    Take it easy.
 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/wordpress-https-site/page/2/#post-4575461)
 * I have implemented for ssl
 *  [Frog Eat Fly](https://wordpress.org/support/users/zerozendesign/)
 * (@zerozendesign)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/wordpress-https-site/page/2/#post-4575522)
 * I have an issue with multisite where ONLY ONE site is ssl. When I activated at
   that site, it has forced all sites in multisite to ssl (very bad). How can I 
   define only that site for ssl and the rest remain [http://](https://wordpress.org/support/topic/wordpress-https-site/page/2/?output_format=md)?
   This is a rather urgent fix.
 * Here is the top of htaccess
 * <IfModule mod_rewrite.c>
    RewriteEngine On RewriteBase / AddDefaultCharset UTF-
   8 RewriteCond %{HTTPS} !=on RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteCond%{
   REQUEST_URI} !^/wp-login.php RewriteCond %{REQUEST_URI} !^/wp-admin RewriteCond%{
   REQUEST_URI} !^/wp-content RewriteRule ^(.*)$ [http://%1/$1](http://%1/$1) [R
   =301,L] RewriteCond %{HTTPS} !=on RewriteCond %{HTTP_HOST} !^www\. RewriteCond%{
   REQUEST_URI} !^/wp-login.php RewriteCond %{REQUEST_URI} !^/wp-admin RewriteCond%{
   REQUEST_URI} !^/wp-content RewriteRule ^(.*)$ [https://%](https://%){HTTP_HOST}/
   $1 [R=301,L] RewriteCond %{REQUEST_METHOD} !POST RewriteCond %{QUERY_STRING} !.*
   =.* RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\”]+ [NC] RewriteCond %{HTTP:Profile}!
   ^[a-z0-9\”]+ [NC] RewriteCond /home/codeless/public_html/codelessme.com/wp-content/
   cache/all/$1/index.html -f RewriteRule ^(.*) “/wp-content/cache/all/$1/index.
   html” [L] </IfModule>
 *  [Frog Eat Fly](https://wordpress.org/support/users/zerozendesign/)
 * (@zerozendesign)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/wordpress-https-site/page/2/#post-4575523)
 * Think I resolved the issue.
 * Does this look correct?
 * <IfModule mod_rewrite.c>
    RewriteEngine On RewriteBase / AddDefaultCharset UTF-
   8 RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteCond %{REQUEST_URI} !^/wp-
   login.php RewriteCond %{REQUEST_URI} !^/wp-admin RewriteCond %{REQUEST_URI} !
   ^/wp-content RewriteRule ^(.*)$ [http://%1/$1](http://%1/$1) [R=301,L] RewriteCond%{
   HTTP_HOST} !^www\. RewriteCond %{REQUEST_URI} !^/wp-login.php RewriteCond %{REQUEST_URI}!
   ^/wp-admin RewriteCond %{REQUEST_URI} !^/wp-content RewriteCond %{REQUEST_METHOD}!
   POST RewriteCond %{QUERY_STRING} !.*=.* RewriteCond %{HTTP:X-Wap-Profile} !^[
   a-z0-9\”]+ [NC] RewriteCond %{HTTP:Profile} !^[a-z0-9\”]+ [NC] RewriteCond /home/
   codeless/public_html/codelessme.com/wp-content/cache/all/$1/index.html -f RewriteRule
   ^(.*) “/wp-content/cache/all/$1/index.html” [L] </IfModule>
 *  [Frog Eat Fly](https://wordpress.org/support/users/zerozendesign/)
 * (@zerozendesign)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/wordpress-https-site/page/2/#post-4575524)
 * So now – my only question remaining is –
 * How do we write htaccess to include https and http?

Viewing 15 replies - 16 through 30 (of 31 total)

[←](https://wordpress.org/support/topic/wordpress-https-site/?output_format=md) 
[1](https://wordpress.org/support/topic/wordpress-https-site/?output_format=md) 
2 [3](https://wordpress.org/support/topic/wordpress-https-site/page/3/?output_format=md)
[→](https://wordpress.org/support/topic/wordpress-https-site/page/3/?output_format=md)

The topic ‘WordPress https site’ 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

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

 * 31 replies
 * 5 participants
 * Last reply from: [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * Last activity: [12 years, 2 months ago](https://wordpress.org/support/topic/wordpress-https-site/page/3/#post-4575525)
 * Status: resolved