• Resolved paolo_belotti

    (@paolo_belotti)


    Great Plugin Folks!

    Just a little problem with the language selector widget of WPML.
    I abilitate the widget but it doesn’t work if I have also abilitate Super Cache. On the contrary, if I switch off Super Cache I have the possibility to use the widget in the mobile site view.
    I have of course abilitate the mod_rewrite to serve cache files (see below configuration).
    Any suggestion?
    Thanks
    Paolo

    # BEGIN WPSuperCache
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    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_USER_AGENT} !^.*(android|blackberry|hiptop|ipod|lge\ vx|midp|maemo|mmp|netfront|nintendo\ DS|novarra|openweb|opera\ mobi|opera\ mini|palm|psp|phone|smartphone|symbian|up.browser|up.link|wap|windows\ ce).* [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 %{DOCUMENT_ROOT}/home/content/47/5623947/html/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz -f
    RewriteRule ^(.*) “/home/content/47/5623947/html/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 %{HTTP:Profile} !^[a-z0-9\”]+ [NC]
    RewriteCond %{HTTP_USER_AGENT} !^.*(android|blackberry|hiptop|ipod|lge\ vx|midp|maemo|mmp|netfront|nintendo\ DS|novarra|openweb|opera\ mobi|opera\ mini|palm|psp|phone|smartphone|symbian|up.browser|up.link|wap|windows\ ce).* [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 %{DOCUMENT_ROOT}/home/content/47/5623947/html/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html -f
    RewriteRule ^(.*) “/home/content/47/5623947/html/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html” [L]
    </IfModule>
    # END WPSuperCache
    Rules must be added to /home/content/47/5623947/html/wp-content/cache/.htaccess too:

    # BEGIN supercache
    <IfModule mod_mime.c>
    <FilesMatch “\.html\.gz$”>
    ForceType text/html
    FileETag None
    </FilesMatch>
    AddEncoding gzip .gz
    AddType text/html .gz
    </IfModule>
    <IfModule mod_deflate.c>
    SetEnvIfNoCase Request_URI \.gz$ no-gzip
    </IfModule>
    <IfModule mod_headers.c>
    Header set Vary “Accept-Encoding, Cookie”
    Header set Cache-Control ‘max-age=300, must-revalidate’
    </IfModule>
    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType text/html A300
    </IfModule>
    # END supercache

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: WordPress Mobile Pack] little problem with WPML widget and WP Super cache’ is closed to new replies.