Quantcast
Channel: wp-super-cache – WordPress.org Forums
Viewing all articles
Browse latest Browse all 3480

bigt11 on "[Plugin: WP Super Cache] wp super cache force to https"

$
0
0

Ok shortly after posting this I think i answered my own question, the solution is to comment out the rules for redirecting to the plain http cache files and above the super cache rules in my original redirect to https rules I added a "[L]" to the end of it. Below works for me

#------------------------------ TAO SSL Redirect START-------------------------------------#
# TAO - the rule below, will redirect the whole -everything to https format
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L]
#------------------------------ TAO SSL Redirect STOP-------------------------------------#

# BEGIN WPSuperCache
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /

#If you serve pages from behind a proxy you may want to change 'RewriteCond %{HTTPS} on' to something more sensible
AddDefaultCharset UTF-8
RewriteCond %{REQUEST_URI} !^.*[^/]$
RewriteCond %{REQUEST_URI} !^.*//.*$
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 %{HTTP:Accept-Encoding} gzip
RewriteCond %{HTTPS} on
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}/$1/index-https.html.gz -f
RewriteRule ^(.*) "/wp-content/cache/supercache/%{SERVER_NAME}/$1/index-https.html.gz" [L]

#RewriteCond %{REQUEST_URI} !^.*[^/]$
#RewriteCond %{REQUEST_URI} !^.*//.*$
#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 %{HTTP:Accept-Encoding} gzip
#RewriteCond %{HTTPS} !on
#RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}/$1/index-https.html.gz -f
#RewriteRule ^(.*) "/wp-content/cache/supercache/%{SERVER_NAME}/$1/index-https.html.gz" [L]

RewriteCond %{REQUEST_URI} !^.*[^/]$
RewriteCond %{REQUEST_URI} !^.*//.*$
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/supercache/%{SERVER_NAME}/$1/index-https.html -f
RewriteRule ^(.*) "/wp-content/cache/supercache/%{SERVER_NAME}/$1/index-https.html" [L]

#RewriteCond %{REQUEST_URI} !^.*[^/]$
#RewriteCond %{REQUEST_URI} !^.*//.*$
#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/supercache/%{SERVER_NAME}/$1/index-https.html -f
#RewriteRule ^(.*) "/wp-content/cache/supercache/%{SERVER_NAME}/$1/index-https.html" [L]

</IfModule>

# END WPSuperCache

Viewing all articles
Browse latest Browse all 3480

Trending Articles