Support » Plugin: WebP Converter for Media » Fix Error codes: rewrites_not_working
Fix Error codes: rewrites_not_working
-
Report a problem:
Version: 2.0 and above.
If the uploads directory uses soft links, the path in uploads-webpc is the soft link path.Before version 1.6.1, the path corresponding to /wp-content/uploads/.htaccess can be established normally and it works normally.
But the uploads-webpc path in /wp-content/uploads/.htaccess created after 2.0 is wrong, you need to manually correct the correct path for the package to work normally.
-
Hi @cshalove,
Thank you for your message.
Could you please say something more? Explain exactly, step by step, what happened and what you did.
If the wordpress upload soft link path is link => $wppath/wp-content/uploads –> /mnt/xvdb/www/blog/uploads
and
the wordpress upload-webpc soft link path is link => $wppath/wp-content/uploads-webpc –> /mnt/xvdb/www/blog/uploads-webpcThe working profile is
$wppath/wp-content/uploads/.htaccess content# BEGIN WebP Converter # ! --- DO NOT EDIT PREVIOUS LINE --- ! <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTP_ACCEPT} image/webp RewriteCond %{DOCUMENT_ROOT}/wp-content/uploads-webpc/mnt/xvdb/www/blog/uploads/$1.jpg.webp -f RewriteCond %{HTTP_HOST}@@%{HTTP_REFERER} ^([^@]*)@@https?://\1/.* RewriteRule (.+)\.jpg$ /wp-content/uploads-webpc/mnt/xvdb/www/blog/uploads/$1.jpg.webp [NC,T=image/webp,E=cache-control:no-cache,L] RewriteCond %{HTTP_ACCEPT} image/webp RewriteCond %{DOCUMENT_ROOT}/wp-content/uploads-webpc/mnt/xvdb/www/blog/uploads/$1.jpeg.webp -f RewriteCond %{HTTP_HOST}@@%{HTTP_REFERER} ^([^@]*)@@https?://\1/.* RewriteRule (.+)\.jpeg$ /wp-content/uploads-webpc/mnt/xvdb/www/blog/uploads/$1.jpeg.webp [NC,T=image/webp,E=cache-control:no-cache,L] RewriteCond %{HTTP_ACCEPT} image/webp RewriteCond %{DOCUMENT_ROOT}/wp-content/uploads-webpc/mnt/xvdb/www/blog/uploads/$1.png.webp -f RewriteCond %{HTTP_HOST}@@%{HTTP_REFERER} ^([^@]*)@@https?://\1/.* RewriteRule (.+)\.png$ /wp-content/uploads-webpc/mnt/xvdb/www/blog/uploads/$1.png.webp [NC,T=image/webp,E=cache-control:no-cache,L] </IfModule> # ! --- DO NOT EDIT NEXT LINE --- ! # END WebP Converter
If you upgrade to more than 2.0
$wppath/wp-content/uploads/.htaccess content# BEGIN WebP Converter # ! --- DO NOT EDIT PREVIOUS LINE --- ! <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTP_ACCEPT} image/webp RewriteCond %{DOCUMENT_ROOT}/wp-content/uploads-webpc/uploads/$1.jpg.webp -f RewriteCond %{HTTP_HOST}@@%{HTTP_REFERER} ^([^@]*)@@https?://\1/.* RewriteRule (.+)\.jpg$ /wp-content/uploads-webpc/uploads/$1.jpg.webp [NC,T=image/webp,E=cache-control:no-cache,L] RewriteCond %{HTTP_ACCEPT} image/webp RewriteCond %{DOCUMENT_ROOT}/wp-content/uploads-webpc/uploads/$1.jpeg.webp -f RewriteCond %{HTTP_HOST}@@%{HTTP_REFERER} ^([^@]*)@@https?://\1/.* RewriteRule (.+)\.jpeg$ /wp-content/uploads-webpc/uploads/$1.jpeg.webp [NC,T=image/webp,E=cache-control:no-cache,L] RewriteCond %{HTTP_ACCEPT} image/webp RewriteCond %{DOCUMENT_ROOT}/wp-content/uploads-webpc/uploads/$1.png.webp -f RewriteCond %{HTTP_HOST}@@%{HTTP_REFERER} ^([^@]*)@@https?://\1/.* RewriteRule (.+)\.png$ /wp-content/uploads-webpc/uploads/$1.png.webp [NC,T=image/webp,E=cache-control:no-cache,L] </IfModule> # ! --- DO NOT EDIT NEXT LINE --- ! # END WebP Converter
The difference between the two configuration files is that the WebP Converter for Media package creates the location of the file corresponding to the webp file in the upload-webpc path.
Supplementary note: I can only download to version 1.6.0 from https://wordpress.org/plugins/webp-converter-for-media/advanced/, and the content of version 2.0.0-2.0.1 shows 2.1.2, so I don’t know if the 2.0.x version is normal.
@cshalove thank you for the information.
Have you used any plugin filters that modify the path? Could you please send your server configuration available in plugin settings (both for 1.6 and the latest version)?
@mateuszgbiorczyk Hello:
My website does not use any package to change the URL path, only uses its own WordPress fixed URL setting.In addition:
Could you please send your server configuration available in plugin settings (both for 1.6 and the latest version)?
I don’t understand the meaning?I have installed the new version of 2.1.3 and the rewrites_not_working error code appears.
Although an error code appeared in the package, it returned to normal after manually correcting the content of the .htaccess file.
That’s why I reported the problem: There is a problem with the .htaccess generated after using the system configuration and saving, and the file needs to be manually corrected.But I used the old version before, so I downgraded the version to find the usable version 1.6.0
-
This reply was modified 1 month, 3 weeks ago by
cshalove.
@cshalove Your server configuration can be found in the plugin settings. You can find a link to it on the plugin settings page in the “We’re waiting for your message” section.
Please take a screenshot of the entire page and send it to me. Do it by using version 1.6.0 of the plugin and after updating to the latest one. I would like to compare how the configuration differs there, because there is a preview of the paths there.
@mateuszgbiorczyk
Sorry for the late reply, the following is a screenshot
V1.6.0
V1.6.0V2.2.0
V2.2.0@cshalove Thank you very much. This is very strange, what did your .htaccess file look like in version 1.6.0?
@mateuszgbiorczyk
I have answered the difference between the two versions of .htaccess@cshalove, the configuration from version 1.6.0 you provided is also correct? I am asking because something is not right for me. Generating the .htaccess file, the plugin uses the filters that are displayed in the configuration – and the configuration has different values than in the .htaccess file.
@mateuszgbiorczyk
Hello, I have already compared each path .htaccess file
wp-content/.htaccess
wp-content/upload/.htaccess
wp-content/upload-webpc/.htaccessKnow that the content of wp-content/upload/.htaccess is different v1.6.0 vs v 2.1.x (2.2.0)
That’s why I reported this problem to you
Attach a screenshot of the link path
upload link@cshalove Please contact me via e-mail –
mateusz[at]gbiorczyk[dot]pl
. I will try to help you. -
This reply was modified 1 month, 3 weeks ago by
- You must be logged in to reply to this topic.