From 1483910140bc4bdcdee6caa4619829524b585b6b Mon Sep 17 00:00:00 2001 From: root <root@rivolta.investici.org> Date: Mon, 14 Mar 2011 00:34:08 +0000 Subject: [PATCH] add the http protocol (http/https) to the static file cache key --- .htaccess | 10 ++++++---- wp-content/mu-plugins/update_siteurl.php | 20 -------------------- wp-content/wp-cache-config.php | 2 +- 3 files changed, 7 insertions(+), 25 deletions(-) delete mode 100644 wp-content/mu-plugins/update_siteurl.php diff --git a/.htaccess b/.htaccess index f10817134..8438c0731 100644 --- a/.htaccess +++ b/.htaccess @@ -27,8 +27,9 @@ RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC] RewriteCond %{HTTP_USER_AGENT} !^.*(2.0\ MMP|240x320|400X240|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|Googlebot-Mobile|hiptop|IEMobile|KYOCERA/WX310K|LG/U990|MIDP-2.|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|PlayStation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|SHG-i900|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|webOS|Windows\ CE|WinWAP|YahooSeeker/M1A1-R2D2|iPhone|iPod|Android|BlackBerry9530|LG-TU915\ Obigo|LGE\ VX|webOS|Nokia5800).* RewriteCond %{HTTP_user_agent} !^(w3c\ |w3c-|acs-|alav|alca|amoi|audi|avan|benq|bird|blac|blaz|brew|cell|cldc|cmd-|dang|doco|eric|hipt|htc_|inno|ipaq|ipod|jigs|kddi|keji|leno|lg-c|lg-d|lg-g|lge-|lg/u|maui|maxo|midp|mits|mmef|mobi|mot-|moto|mwbp|nec-|newt|noki|palm|pana|pant|phil|play|port|prox|qwap|sage|sams|sany|sch-|sec-|send|seri|sgh-|shar|sie-|siem|smal|smar|sony|sph-|symb|t-mo|teli|tim-|tosh|tsm-|upg1|upsi|vk-v|voda|wap-|wapa|wapi|wapp|wapr|webc|winw|winw|xda\ |xda-).* RewriteCond %{HTTP:Accept-Encoding} gzip -RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz -f -RewriteRule ^(.*) "/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz" [L] +#RewriteCond %{HTTP:X-Forwarded-Proto} !^https$ +RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/%{HTTP:X-Forwarded-Proto}/$1/index.html.gz -f +RewriteRule ^(.*) "/wp-content/cache/supercache/%{HTTP_HOST}/%{HTTP:X-Forwarded-Proto}/$1/index.html.gz" [L] RewriteCond %{REQUEST_URI} !^.*[^/]$ RewriteCond %{REQUEST_URI} !^.*//.*$ @@ -39,8 +40,9 @@ RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC] RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC] RewriteCond %{HTTP_USER_AGENT} !^.*(2.0\ MMP|240x320|400X240|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|Googlebot-Mobile|hiptop|IEMobile|KYOCERA/WX310K|LG/U990|MIDP-2.|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|PlayStation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|SHG-i900|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|webOS|Windows\ CE|WinWAP|YahooSeeker/M1A1-R2D2|iPhone|iPod|Android|BlackBerry9530|LG-TU915\ Obigo|LGE\ VX|webOS|Nokia5800).* RewriteCond %{HTTP_user_agent} !^(w3c\ |w3c-|acs-|alav|alca|amoi|audi|avan|benq|bird|blac|blaz|brew|cell|cldc|cmd-|dang|doco|eric|hipt|htc_|inno|ipaq|ipod|jigs|kddi|keji|leno|lg-c|lg-d|lg-g|lge-|lg/u|maui|maxo|midp|mits|mmef|mobi|mot-|moto|mwbp|nec-|newt|noki|palm|pana|pant|phil|play|port|prox|qwap|sage|sams|sany|sch-|sec-|send|seri|sgh-|shar|sie-|siem|smal|smar|sony|sph-|symb|t-mo|teli|tim-|tosh|tsm-|upg1|upsi|vk-v|voda|wap-|wapa|wapi|wapp|wapr|webc|winw|winw|xda\ |xda-).* -RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html -f -RewriteRule ^(.*) "/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html" [L] +RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/%{HTTP:X-Forwarded-Proto}/$1/index.html -f +#RewriteCond %{HTTP:X-Forwarded-Proto} !^https$ +RewriteRule ^(.*) "/wp-content/cache/supercache/%{HTTP_HOST}/%{HTTP:X-Forwarded-Proto}/$1/index.html" [L] </IfModule> # END WPSuperCache diff --git a/wp-content/mu-plugins/update_siteurl.php b/wp-content/mu-plugins/update_siteurl.php deleted file mode 100644 index 8a2d50906..000000000 --- a/wp-content/mu-plugins/update_siteurl.php +++ /dev/null @@ -1,20 +0,0 @@ -<?php -/* -Plugin Name: Update the 'siteurl' and 'home' options -Plugin URI: https://noblogs.org -Description: Update the 'siteurl' and 'home' options to site_url(), this is necessary to fix a lot of themes which don't take into account https. See also http://wordpress.org/support/topic/blank-wp-comments-postphp-page-when-commenting-on-numerous-wordpress-blogs -Version: 0.1 -Author: Autistici/Inventati -Author URI: https://noblogs.org/ -*/ - -function update_siteurl() { - - update_option('siteurl',site_url()); - update_option('home',site_url()); - -} - -update_siteurl(); - -?> diff --git a/wp-content/wp-cache-config.php b/wp-content/wp-cache-config.php index 800dc33a6..568057e33 100644 --- a/wp-content/wp-cache-config.php +++ b/wp-content/wp-cache-config.php @@ -15,7 +15,7 @@ if ( ! defined('WPCACHEHOME') ) $cache_compression = 0; // Super cache compression $cache_enabled = true; //Added by WP-Cache Manager $super_cache_enabled = true; //Added by WP-Cache Manager -$cache_max_time = 300; //Added by WP-Cache Manager +$cache_max_time = 1801; //Added by WP-Cache Manager //$use_flock = true; // Set it true or false if you know what to use $cache_path = WP_CONTENT_DIR . '/cache/'; $file_prefix = 'wp-cache-'; -- GitLab