aicas
Forum Replies Created
-
Yes, the .htaccess in uploads is still using your temporary solution code with the paths instead of Document Root variable.
I did remove the .htaccess in the main wordpress folder for a couple of minutes and tested redirection. Still not working.
Really appreciate your help and would totally understand, if you don’t have time for this.
Mateusz,
I really appreciate your help and fast response. I did copy the code to the htaccess in the wp-content/upload directory, but replacement is still not working. I even deactivated Autoptimize and W3 Cache (and flushed caches and local browser data).
To see the content of the Server variable I created a short script.
https://www.aicas.com/wp/wp-content/path.phpmod_rewrite, mod_mime and mod_expire are installed according to our sys admin and your example is working, too.
https://www.aicas.com/wp/wp-content/plugins/webp-converter-for-media/public/img/icon-before.pngAnother interesting thing. I created two test images of my own.
https://aicas.com/wp/wp-content/uploads/2020/12/shutterstock_1053687887-scaled.jpg
Shows the original image, but when I change the pathhttps://aicas.com/wp/wp-content/uploads-webpc/uploads/2020/12/shutterstock_1053687887-scaled.jpg
it replaces the image with the (different Webp) without changing the file extension. The way it should work.- This reply was modified 4 years, 9 months ago by aicas.
Document Root is:
/kunden/homepages/17/d33475532/htdocsHi Matesuz,
Sorry for the delay and misunderstanding. Please find answers to all questions in the FAQ.
1. Do you have any error on the plugin settings page?
– No2. URL of your website
– https://www.aicas.com3. Does your server meet the technical requirements described in the FAQ?
– As far as I can see, it should meet the requirement. https://www.aicas.com/wp/wp-content/uploads/2020/06/aicas-server-config-webpc.png4. Do you use CDN?
– No5. Check if in /wp-content/uploads-webpc directory are all files that should be converted.
– All converted files, that are smaller than the original are there.6. If in the previous step it turned out that you have files, please do the test.
– https://www.aicas.com/wp/wp-content/uploads/2020/06/devtools-screenshot.png
(for https://www.aicas.com/wp/segments/agriculture/)7. Content of your .htaccess files from directories /wp-content, /wp-content/uploads and /wp-content/uploads-webpc
wp-content:
Empty Filewp-content/uploads:
# BEGIN WebP Converter # ! --- DO NOT EDIT PREVIOUS LINE --- ! <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /wp RewriteCond %{HTTP_ACCEPT} image/webp RewriteCond %{DOCUMENT_ROOT}/wp/wp-content/uploads-webpc/$1.jpg.webp -f RewriteRule (.+)\.jpg$ /wp/wp-content/uploads-webpc/$1.jpg.webp [NC,T=image/webp,E=cache-control:private,L] RewriteCond %{HTTP_ACCEPT} image/webp RewriteCond %{DOCUMENT_ROOT}/wp/wp-content/uploads-webpc/$1.jpeg.webp -f RewriteRule (.+)\.jpeg$ /wp/wp-content/uploads-webpc/$1.jpeg.webp [NC,T=image/webp,E=cache-control:private,L] RewriteCond %{HTTP_ACCEPT} image/webp RewriteCond %{DOCUMENT_ROOT}/wp/wp-content/uploads-webpc/$1.png.webp -f RewriteRule (.+)\.png$ /wp/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
wp-content/uploads-webpc:
# BEGIN WebP Converter # ! --- DO NOT EDIT PREVIOUS LINE --- ! <IfModule mod_mime.c> AddType image/webp .webp </IfModule> <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/webp "access plus 1 year" </IfModule> # ! --- DO NOT EDIT NEXT LINE --- ! # END WebP Converter
8. Do you use any plugin filters or actions from this FAQ?
– No, did not add any filters or actions manually.9. What plugin version are you using?
– Version 1.3.010. Used WordPress version?
– Version 5.4.211. A list of all the plugins you use.
(Have not deactivated and reverted to default theme, because the site is already live)Advanced Custom Fields
Autoptimize
Content Box Addon For Elementor
Custom Post Type UI
Custom Scripts for Customizer
Debug Bar
Elementor
Elementor Addon Elements
Elementor Pro
Enable Media Replace
Essential Addons for Elementor
Export Media Library
GDPR Cookie Compliance
Gravity Forms
Gravity Forms – SuiteCRM Integration
Modern Events Calendar Lite
Multiple Columns for Gravity Forms
Premium Addons for Elementor
Simple Job Board
SVG Support
The GDPR Framework
User Role Editor
W3 Total Cache
WebP Converter for Media
WP Floating Menu
WP Meta SEO
WP ResetWhen testing, I did flush all caches of Autoptimize and W3 Total Cache and deleted local browser cache.
- This reply was modified 4 years, 9 months ago by aicas.
I did read the plugin FAQ and did not find out, where the htaccess file modified by Webpc was supposed to be.
Now I found it. It was at /wp/wp-content/uploads and contained following rules
# BEGIN WebP Converter
# ! — DO NOT EDIT PREVIOUS LINE — !
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_ACCEPT} image/webp
RewriteCond %{DOCUMENT_ROOT}/wp/wp-content/uploads-webpc/uploads/$1.jpg.webp -f
RewriteRule (.+)\.jpg$ /wp/wp-content/uploads-webpc/uploads/$1.jpg.webp [NC,T=image/webp,E=cache-control:private,L]
RewriteCond %{HTTP_ACCEPT} image/webp
RewriteCond %{DOCUMENT_ROOT}/wp/wp-content/uploads-webpc/uploads/$1.jpeg.webp -f
RewriteRule (.+)\.jpeg$ /wp/wp-content/uploads-webpc/uploads/$1.jpeg.webp [NC,T=image/webp,E=cache-control:private,L]
RewriteCond %{HTTP_ACCEPT} image/webp
RewriteCond %{DOCUMENT_ROOT}/wp/wp-content/uploads-webpc/uploads/$1.png.webp -f
RewriteRule (.+)\.png$ /wp/wp-content/uploads-webpc/uploads/$1.png.webp [NC,T=image/webp,E=cache-control:private,L]
</IfModule>
# ! — DO NOT EDIT NEXT LINE — !
# END WebP ConverterThe thing is, this still does not replace the original files with webp files, although the webp files are available (I did regenerate existing images) and can manually load the webp files in the browser, when I enter the URL.
I checked the .htaccess files in the root directory, wp directory and wp-content directory. None contained any lines from the plugin and had not been updated recently.
As far as I understand one of those should have been updated to include redirect rules?