• Had an old message here about WP hide conflicting with image optimisation on litespeed servers. Basically the LS requests get a 404 from the WP-hide .htaccess rules, meaning that images don’t get optimised via their cloud.

    The fix is to add this line

    RewriteCond %{HTTP_USER_AGENT} !QUIC/

    In the following locations…

    RewriteCond %{ENV:REDIRECT_STATUS} ^$
    RewriteCond %{HTTP_USER_AGENT} !QUIC/
    RewriteCond %{HTTP_COOKIE} !^.*wordpress_logged_in.*$ [NC]
    RewriteRule ^wp-includes(.*) /index.php?wph-throw-404 [L]

    and further down…

    RewriteCond %{HTTP_USER_AGENT} !QUIC/
    RewriteCond %{ENV:REDIRECT_STATUS} ^$
    RewriteCond %{HTTP_COOKIE} !^.*wordpress_logged_in.*$ [NC]
    RewriteRule ^wp-content(.+) /index.php?wph-throw-404 [L]

    Please note that everytime you update settings in WP-Hide your custom entries will be overwritten, so you’ll need to add them in again. Can we please have these lines added as default. I keep my .htaccess write protected in case they’re written over by accident, and have to change properties each time I make settings.

  • The topic ‘Important .htaccess fix for litespeed servers’ is closed to new replies.