Yes, but the rule of this topic is the first rule.
Code:
RewriteCond %{HTTP_ACCEPT} image/webp
RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}imgwebp/p/$1/$1$2$3.webp [L]
Code:
RewriteCond %{HTTP_ACCEPT} image/webp
RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}imgwebp/p/$1/$2/$1$2$3$4.webp [L]
RewriteCond %{HTTP_ACCEPT} image/webp
RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}imgwebp/p/$1/$2/$3/$1$2$3$4$5.webp [L]
RewriteCond %{HTTP_ACCEPT} image/webp
RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}imgwebp/p/$1/$2/$3/$4/$1$2$3$4$5$6.webp [L]
this rule
Code:
RewriteCond %{HTTP_ACCEPT} image/webp
RewriteRule ^img/(.*).png$ %{ENV:REWRITEBASE}imgwebp/$1.webp [L]