need help with SP supercache plugin

5 replies
Edit: Sorry, title is misspelled, I mean WP Super Cache.

I have recently installed WP Super Cache on some sites of mine.

There is an option in there to do the caching with Mod_rewrite as opposed to PHP. (And this is where my subject matter knowledge drops off precipitously...)

If you choose mod_rewrite, it offers to update your whole .htaccess.

With all the new stuff in this .htaccess file, once in a while when I go to the site it only shows a bunch of gibberish on the front page and nothing else.

The link to login as a WP admin still works, though, and once I log in, the site goes back to normal.

Does anybody know what is going on, or how to fix it? Presumably it's in conflict with something else?

If it's possible, I would like to keep this plugin. It certainly makes a difference in the loading time of my site.

Thanks!
#plugin #supercache
  • Profile picture of the author Kingfish85
    Use PHP. Also, if your webhost uses CloudFlare - I'd suggest using it.

    Would you mind posting what you see on the page when the problem occurs? Without knowing what's in the .htaccess file it's hard to troubleshoot...
    Signature

    |~| VeeroTech Hosting - sales @ veerotech.net
    |~| High Performance CloudLinux & LiteSpeed Powered Web Hosting
    |~| cPanel & WHM - Softaculous - Website Builder - R1Soft - SpamExperts
    |~| Visit us @veerotech Facebook - Twitter - LinkedIn

    {{ DiscussionBoard.errors[6044762].message }}
    • Profile picture of the author tsgeric
      What the plugin adds to the original .htaccess file is:
      # 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
      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 %{HTTProfile} !^[a-z0-9\"]+ [NC]
      RewriteCond %{HTTP_USER_AGENT} !^.*(2.0\ MMP|240x320|400X240|AvantGo|BlackBerry|Blazer|Cell phone|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).* [NC]
      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-).* [NC]
      RewriteCond %{HTTP:Accept-Encoding} gzip
      RewriteCond %{HTTPS} on
      RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index-https.html.gz -f
      RewriteRule ^(.*) "/wp-content/cache/supercache/%{HTTP_HOST}/$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 %{HTTProfile} !^[a-z0-9\"]+ [NC]
      RewriteCond %{HTTP_USER_AGENT} !^.*(2.0\ MMP|240x320|400X240|AvantGo|BlackBerry|Blazer|Cell phone|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).* [NC]
      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-).* [NC]
      RewriteCond %{HTTP:Accept-Encoding} gzip
      RewriteCond %{HTTPS} !on
      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 %{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 %{HTTProfile} !^[a-z0-9\"]+ [NC]
      RewriteCond %{HTTP_USER_AGENT} !^.*(2.0\ MMP|240x320|400X240|AvantGo|BlackBerry|Blazer|Cell phone|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).* [NC]
      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-).* [NC]
      RewriteCond %{HTTPS} on
      RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index-https.html -f
      RewriteRule ^(.*) "/wp-content/cache/supercache/%{HTTP_HOST}/$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 %{HTTProfile} !^[a-z0-9\"]+ [NC]
      RewriteCond %{HTTP_USER_AGENT} !^.*(2.0\ MMP|240x320|400X240|AvantGo|BlackBerry|Blazer|Cell phone|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).* [NC]
      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-).* [NC]
      RewriteCond %{HTTPS} !on
      RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html -f
      RewriteRule ^(.*) "/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html" [L]
      </IfModule>

      # END WPSuperCache
      and what's on the page is about a page's worth of this: ...
      ‹í=ínÛÆ-¿m ï0Upët¯)Z'í8þ*'mÃ'¦‰;7·h cDŽÄ‰)Ë!-«¹úûgØöYöQú${ÃŽ~J"L:IoÛ½FKäÌ™3 çûÌçá§Â^Å"Å"wú˜yñÄg§¯>{zÂ:-m¿Å"Øö£óGìïOο}ÆzÃ-vñ@ËXª€û¶ýøy‡u¼8÷m{:Âv§Æ'®ŠÆö ùKûaõ°rúÃ'Å K5»nìvŽ?Y?¤¯'~ Âjàôîß¿oªwËœ+££ŽGæó`|Ã"ÂõêÌÀà œea¤FÃ'9"ñ$Å'ëQ`÷zTp"bÎð½%~LäÕQçD± bë|Å sÌ·£N,®c[=`ŽÇ#-â£Wç_Z{f#ËœXƾ8þ&qDtÉÙ?Ø©§b5ŽxèÃØ ¹ 5ã t'ÃŽÂ¥f#±‡b,Æ'@DúÃ6U?Y(¾ .Y$ü£ŽŽg¾Ãžq‡y'Ã¥}¸4Mte0Rö4´RíØ ¡íÃ--J¹"°©zÃ--Ã'ºÃbèGÅ >}ŸWrhÀ‰„Rì?µ¬ïåˆ=}Ìîà ½p¼öÉúÚL-Àâ¾+,Â¥(áiù^®ý`Y%´ü8Ã...ì7Dlw5fÜ EðXdHð0ô¥ÃQ¦íHë¿^£ 
      Signature

      {{ DiscussionBoard.errors[6044898].message }}
  • Profile picture of the author Kingfish85
    Good grief. Turn the mod-rewrite off and use PHP. What do you get then?
    Signature

    |~| VeeroTech Hosting - sales @ veerotech.net
    |~| High Performance CloudLinux & LiteSpeed Powered Web Hosting
    |~| cPanel & WHM - Softaculous - Website Builder - R1Soft - SpamExperts
    |~| Visit us @veerotech Facebook - Twitter - LinkedIn

    {{ DiscussionBoard.errors[6044907].message }}
  • Profile picture of the author tsgeric
    Good grief is right!

    all back to normal with the PHP option, also I rewrote my .htaccess to the original plain 5-lines or so.

    The site just feels faster with that more troublesome option, just trying to make it work, that's all, if anybody had any insight into that code.
    Signature

    {{ DiscussionBoard.errors[6044924].message }}
  • Profile picture of the author Kingfish85
    Also,

    The more lines that have to be processed in the htaccess, the slower the site will be. The htaccess file gets processed before serving any data.

    My suggestion - use a CDN such as CloudFlare. We recommend this to all of our customers and we use it on our site. CloudFlare in combination with LiteSpeed (replaces apache) is amazing.
    Signature

    |~| VeeroTech Hosting - sales @ veerotech.net
    |~| High Performance CloudLinux & LiteSpeed Powered Web Hosting
    |~| cPanel & WHM - Softaculous - Website Builder - R1Soft - SpamExperts
    |~| Visit us @veerotech Facebook - Twitter - LinkedIn

    {{ DiscussionBoard.errors[6044930].message }}

Trending Topics