I'm running Wordpress with WebP Express plugin and trying to serve WebP instead of JPEG and PNG for browsers that support it. It started working after I found a way to enable reading .htaccess in subfolders (since the rules are in the "/wp-content/uploads/" folder).
Hovewer the problem is that OpenLiteSpeed doesn't support mod_headers in .htaccess. Which means I can't add (highly?) recommended header "Vary: Accept".
I found out that you can specify Static Context and add headers there. But apparently doing this prevents any subsequent document-level .htaccess rules from working. As a result I get images with "Vary: Accept" but they don't get replaced with WebP.
My context properties:
Can someone offer any insight? How important Vary Accept actually? And how do I make it work with rewrite rules?
Hovewer the problem is that OpenLiteSpeed doesn't support mod_headers in .htaccess. Which means I can't add (highly?) recommended header "Vary: Accept".
I found out that you can specify Static Context and add headers there. But apparently doing this prevents any subsequent document-level .htaccess rules from working. As a result I get images with "Vary: Accept" but they don't get replaced with WebP.
My context properties:
Code:
URI: exp:^.*(jpg|jpeg|png)$
Location: $DOC_ROOT/$0
Accessible: Yes
Header operations: append Vary Accept
Last edited: