@bartkleinreesink hi, could you help me?
Could you send me the correct rules?
Enable direct redirection to existing converted images? – Failed
Enable redirection to converter? – Done
Create webp files upon request? – Done
I can’t find the mistake =(
All FAQ rules doesn’t work.
I have this:
# WebP Express rules
# --------------------
location ~* ^/wp-content/.*\.(?i)(png|jpe?g)$ {
add_header vary accept;
expires 365d;
}
location ~* ^/wp-content/.*\.webp$ {
expires 365d;
if ($whattodo = AB) {
add_header vary accept;
}
}
if ($http_accept ~* "webp"){
set $whattodo A;
}
if (-f $request_filename.webp) {
set $whattodo "${whattodo}B";
}
if ($whattodo = AB) {
rewrite ^(.*) $1.webp last;
}
if ($whattodo = A) {
rewrite ^/wp-content/.*\.(?i)(jpe?g|png)$ /wp-content/plugins/webp-express/wod/webp-on-demand.php?wp-content=wp-content break;
}
# ------------------- (WebP Express rules ends here)
-
This reply was modified 4 years, 4 months ago by korotkow.