jakegeno
Forum Replies Created
-
I tested it and now I can forget about changing this with every update, thank you!
Sorry for the very late response, but I didn’t touch that file since updating it until now, when I updated the plugin (I basically had to do exactly the same thing to make it work again).
All in all my file looks like this now (with your newest update):# BEGIN WebP Converter # ! --- DO NOT EDIT PREVIOUS LINE --- ! <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTP_ACCEPT} image/webp RewriteCond /web/wordpress2072248/autoinstalator/wordpressplus/wp-content/uploads-webpc/$1.jpg.webp -f RewriteRule (.+)\.jpg$ /wp-content/uploads-webpc/$1.jpg.webp [NC,T=image/webp,E=cache-control:private,L] RewriteCond %{HTTP_ACCEPT} image/webp RewriteCond /web/wordpress2072248/autoinstalator/wordpressplus/wp-content/uploads-webpc/$1.jpeg.webp -f RewriteRule (.+)\.jpeg$ /wp-content/uploads-webpc/$1.jpeg.webp [NC,T=image/webp,E=cache-control:private,L] RewriteCond %{HTTP_ACCEPT} image/webp RewriteCond /web/wordpress2072248/autoinstalator/wordpressplus/wp-content/uploads-webpc/$1.png.webp -f RewriteRule (.+)\.png$ /wp-content/uploads-webpc/$1.png.webp [NC,T=image/webp,E=cache-control:private,L] </IfModule> # ! --- DO NOT EDIT NEXT LINE --- ! # END WebP Converter
The only thing that changed is removing %{DOCUMENT_ROOT} variable and replacing it with absolute path. It seems like home.pl is not using this variable properly – at least on the cheapest hosting plan they have, as according to apache docs it should work like a charm ??
- This reply was modified 4 years, 10 months ago by jakegeno.
Problem solved – it seems like the problem is with my hosting – ${DOCUMENT_ROOT} variable does not point properly to actual root, so none of the files existed. After changing path in RewriteCond to absolute directory of uploads-webpc webp images are being loaded.
Additionally I can say that after commenting:
RewriteCond %{DOCUMENT_ROOT}/wp-content/uploads-webpc/$1.png.webp -f
I see some webp files loaded (I guess only these that are converted to webp format currently), but files that are not converted are timed out.It seems like this RewriteCond is not working for some reason.